aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/addr.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-01-23 17:07:38 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2013-02-22 23:31:31 -0500
commit496ad9aa8ef448058e36ca7a787c61f2e63f0f54 (patch)
tree8f4abde793cd7db5bb8fde6d27ebcacd0e54379a /fs/ceph/addr.c
parent57eccb830f1cc93d4b506ba306d8dfa685e0c88f (diff)
new helper: file_inode(file)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ceph/addr.c')
-rw-r--r--fs/ceph/addr.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
index 064d1a68d2c1..d4f81edd9a5d 100644
--- a/fs/ceph/addr.c
+++ b/fs/ceph/addr.c
@@ -195,7 +195,7 @@ static int ceph_releasepage(struct page *page, gfp_t g)
195 */ 195 */
196static int readpage_nounlock(struct file *filp, struct page *page) 196static int readpage_nounlock(struct file *filp, struct page *page)
197{ 197{
198 struct inode *inode = filp->f_dentry->d_inode; 198 struct inode *inode = file_inode(filp);
199 struct ceph_inode_info *ci = ceph_inode(inode); 199 struct ceph_inode_info *ci = ceph_inode(inode);
200 struct ceph_osd_client *osdc = 200 struct ceph_osd_client *osdc =
201 &ceph_inode_to_client(inode)->client->osdc; 201 &ceph_inode_to_client(inode)->client->osdc;
@@ -370,7 +370,7 @@ out:
370static int ceph_readpages(struct file *file, struct address_space *mapping, 370static int ceph_readpages(struct file *file, struct address_space *mapping,
371 struct list_head *page_list, unsigned nr_pages) 371 struct list_head *page_list, unsigned nr_pages)
372{ 372{
373 struct inode *inode = file->f_dentry->d_inode; 373 struct inode *inode = file_inode(file);
374 struct ceph_fs_client *fsc = ceph_inode_to_client(inode); 374 struct ceph_fs_client *fsc = ceph_inode_to_client(inode);
375 int rc = 0; 375 int rc = 0;
376 int max = 0; 376 int max = 0;
@@ -977,7 +977,7 @@ static int ceph_update_writeable_page(struct file *file,
977 loff_t pos, unsigned len, 977 loff_t pos, unsigned len,
978 struct page *page) 978 struct page *page)
979{ 979{
980 struct inode *inode = file->f_dentry->d_inode; 980 struct inode *inode = file_inode(file);
981 struct ceph_inode_info *ci = ceph_inode(inode); 981 struct ceph_inode_info *ci = ceph_inode(inode);
982 struct ceph_mds_client *mdsc = ceph_inode_to_client(inode)->mdsc; 982 struct ceph_mds_client *mdsc = ceph_inode_to_client(inode)->mdsc;
983 loff_t page_off = pos & PAGE_CACHE_MASK; 983 loff_t page_off = pos & PAGE_CACHE_MASK;
@@ -1086,7 +1086,7 @@ static int ceph_write_begin(struct file *file, struct address_space *mapping,
1086 loff_t pos, unsigned len, unsigned flags, 1086 loff_t pos, unsigned len, unsigned flags,
1087 struct page **pagep, void **fsdata) 1087 struct page **pagep, void **fsdata)
1088{ 1088{
1089 struct inode *inode = file->f_dentry->d_inode; 1089 struct inode *inode = file_inode(file);
1090 struct ceph_inode_info *ci = ceph_inode(inode); 1090 struct ceph_inode_info *ci = ceph_inode(inode);
1091 struct ceph_file_info *fi = file->private_data; 1091 struct ceph_file_info *fi = file->private_data;
1092 struct page *page; 1092 struct page *page;
@@ -1144,7 +1144,7 @@ static int ceph_write_end(struct file *file, struct address_space *mapping,
1144 loff_t pos, unsigned len, unsigned copied, 1144 loff_t pos, unsigned len, unsigned copied,
1145 struct page *page, void *fsdata) 1145 struct page *page, void *fsdata)
1146{ 1146{
1147 struct inode *inode = file->f_dentry->d_inode; 1147 struct inode *inode = file_inode(file);
1148 struct ceph_inode_info *ci = ceph_inode(inode); 1148 struct ceph_inode_info *ci = ceph_inode(inode);
1149 struct ceph_fs_client *fsc = ceph_inode_to_client(inode); 1149 struct ceph_fs_client *fsc = ceph_inode_to_client(inode);
1150 struct ceph_mds_client *mdsc = fsc->mdsc; 1150 struct ceph_mds_client *mdsc = fsc->mdsc;
@@ -1228,7 +1228,7 @@ const struct address_space_operations ceph_aops = {
1228 */ 1228 */
1229static int ceph_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) 1229static int ceph_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
1230{ 1230{
1231 struct inode *inode = vma->vm_file->f_dentry->d_inode; 1231 struct inode *inode = file_inode(vma->vm_file);
1232 struct page *page = vmf->page; 1232 struct page *page = vmf->page;
1233 struct ceph_mds_client *mdsc = ceph_inode_to_client(inode)->mdsc; 1233 struct ceph_mds_client *mdsc = ceph_inode_to_client(inode)->mdsc;
1234 loff_t off = page_offset(page); 1234 loff_t off = page_offset(page);