fs: Give dentry to inode_change_ok() instead of inode
[pandora-kernel.git] / fs / xfs / xfs_file.c
index 8ae937a..ba1d477 100644 (file)
@@ -1026,7 +1026,8 @@ xfs_file_fallocate(
        if (file->f_flags & O_DSYNC)
                attr_flags |= XFS_ATTR_SYNC;
 
-       error = -xfs_change_file_space(ip, cmd, &bf, 0, attr_flags);
+       error = -xfs_change_file_space(file->f_dentry, cmd, &bf, 0,
+                                      attr_flags);
        if (error)
                goto out_unlock;
 
@@ -1036,7 +1037,8 @@ xfs_file_fallocate(
 
                iattr.ia_valid = ATTR_SIZE;
                iattr.ia_size = new_size;
-               error = -xfs_setattr_size(ip, &iattr, XFS_ATTR_NOLOCK);
+               error = -xfs_setattr_size(file->f_dentry, &iattr,
+                                         XFS_ATTR_NOLOCK);
        }
 
 out_unlock: