@@ -1547,7 +1547,7 @@ static vm_fault_t ceph_page_mkwrite(struct vm_fault *vmf)
lock_page(page);
locked_page = page;
}
- err = ceph_uninline_data(vma->vm_file, locked_page);
+ err = ceph_uninline_data(inode, locked_page);
if (locked_page)
unlock_page(locked_page);
if (err < 0)
@@ -1663,9 +1663,8 @@ void ceph_fill_inline_data(struct inode *inode, struct page *locked_page,
}
}
-int ceph_uninline_data(struct file *filp, struct page *locked_page)
+int ceph_uninline_data(struct inode *inode, struct page *locked_page)
{
- struct inode *inode = file_inode(filp);
struct ceph_inode_info *ci = ceph_inode(inode);
struct ceph_fs_client *fsc = ceph_inode_to_client(inode);
struct ceph_osd_request *req;
@@ -1439,7 +1439,7 @@ static ssize_t ceph_write_iter(struct kiocb *iocb, struct iov_iter *from)
inode_inc_iversion_raw(inode);
if (ci->i_inline_version != CEPH_INLINE_NONE) {
- err = ceph_uninline_data(file, NULL);
+ err = ceph_uninline_data(inode, NULL);
if (err < 0)
goto out;
}
@@ -1763,7 +1763,7 @@ static long ceph_fallocate(struct file *file, int mode,
}
if (ci->i_inline_version != CEPH_INLINE_NONE) {
- ret = ceph_uninline_data(file, NULL);
+ ret = ceph_uninline_data(inode, NULL);
if (ret < 0)
goto unlock;
}
@@ -1070,7 +1070,7 @@ extern void ceph_put_fmode(struct ceph_inode_info *ci, int mode);
/* addr.c */
extern const struct address_space_operations ceph_aops;
extern int ceph_mmap(struct file *file, struct vm_area_struct *vma);
-extern int ceph_uninline_data(struct file *filp, struct page *locked_page);
+extern int ceph_uninline_data(struct inode *inode, struct page *locked_page);
extern int ceph_pool_perm_check(struct ceph_inode_info *ci, int need);
extern void ceph_pool_perm_destroy(struct ceph_mds_client* mdsc);
It only uses the file to get to the inode, and all of the callers have a pointer to the inode already. Signed-off-by: Jeff Layton <jlayton@kernel.org> --- fs/ceph/addr.c | 5 ++--- fs/ceph/file.c | 4 ++-- fs/ceph/super.h | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-)