Merge branch 'stable-3.2' into pandora-3.2
[pandora-kernel.git] / fs / xfs / xfs_vnodeops.c
index ce9268a..feb9e75 100644 (file)
@@ -131,7 +131,8 @@ xfs_readlink(
                         __func__, (unsigned long long) ip->i_ino,
                         (long long) pathlen);
                ASSERT(0);
-               return XFS_ERROR(EFSCORRUPTED);
+               error = XFS_ERROR(EFSCORRUPTED);
+               goto out;
        }
 
 
@@ -2233,12 +2234,13 @@ xfs_free_file_space(
  */
 int
 xfs_change_file_space(
-       xfs_inode_t     *ip,
+       struct dentry   *dentry,
        int             cmd,
        xfs_flock64_t   *bf,
        xfs_off_t       offset,
        int             attr_flags)
 {
+       xfs_inode_t     *ip = XFS_I(dentry->d_inode);
        xfs_mount_t     *mp = ip->i_mount;
        int             clrprealloc;
        int             error;
@@ -2328,7 +2330,7 @@ xfs_change_file_space(
                iattr.ia_valid = ATTR_SIZE;
                iattr.ia_size = startoffset;
 
-               error = xfs_setattr_size(ip, &iattr, attr_flags);
+               error = xfs_setattr_size(dentry, &iattr, attr_flags);
 
                if (error)
                        return error;