diff options
Diffstat (limited to 'fs/ceph/ioctl.c')
-rw-r--r-- | fs/ceph/ioctl.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/ceph/ioctl.c b/fs/ceph/ioctl.c index 36549a46e311..f5ed767806df 100644 --- a/fs/ceph/ioctl.c +++ b/fs/ceph/ioctl.c | |||
@@ -16,11 +16,11 @@ | |||
16 | */ | 16 | */ |
17 | static long ceph_ioctl_get_layout(struct file *file, void __user *arg) | 17 | static long ceph_ioctl_get_layout(struct file *file, void __user *arg) |
18 | { | 18 | { |
19 | struct ceph_inode_info *ci = ceph_inode(file->f_dentry->d_inode); | 19 | struct ceph_inode_info *ci = ceph_inode(file_inode(file)); |
20 | struct ceph_ioctl_layout l; | 20 | struct ceph_ioctl_layout l; |
21 | int err; | 21 | int err; |
22 | 22 | ||
23 | err = ceph_do_getattr(file->f_dentry->d_inode, CEPH_STAT_CAP_LAYOUT); | 23 | err = ceph_do_getattr(file_inode(file), CEPH_STAT_CAP_LAYOUT); |
24 | if (!err) { | 24 | if (!err) { |
25 | l.stripe_unit = ceph_file_layout_su(ci->i_layout); | 25 | l.stripe_unit = ceph_file_layout_su(ci->i_layout); |
26 | l.stripe_count = ceph_file_layout_stripe_count(ci->i_layout); | 26 | l.stripe_count = ceph_file_layout_stripe_count(ci->i_layout); |
@@ -63,12 +63,12 @@ static long __validate_layout(struct ceph_mds_client *mdsc, | |||
63 | 63 | ||
64 | static long ceph_ioctl_set_layout(struct file *file, void __user *arg) | 64 | static long ceph_ioctl_set_layout(struct file *file, void __user *arg) |
65 | { | 65 | { |
66 | struct inode *inode = file->f_dentry->d_inode; | 66 | struct inode *inode = file_inode(file); |
67 | struct inode *parent_inode; | 67 | struct inode *parent_inode; |
68 | struct ceph_mds_client *mdsc = ceph_sb_to_client(inode->i_sb)->mdsc; | 68 | struct ceph_mds_client *mdsc = ceph_sb_to_client(inode->i_sb)->mdsc; |
69 | struct ceph_mds_request *req; | 69 | struct ceph_mds_request *req; |
70 | struct ceph_ioctl_layout l; | 70 | struct ceph_ioctl_layout l; |
71 | struct ceph_inode_info *ci = ceph_inode(file->f_dentry->d_inode); | 71 | struct ceph_inode_info *ci = ceph_inode(file_inode(file)); |
72 | struct ceph_ioctl_layout nl; | 72 | struct ceph_ioctl_layout nl; |
73 | int err; | 73 | int err; |
74 | 74 | ||
@@ -76,7 +76,7 @@ static long ceph_ioctl_set_layout(struct file *file, void __user *arg) | |||
76 | return -EFAULT; | 76 | return -EFAULT; |
77 | 77 | ||
78 | /* validate changed params against current layout */ | 78 | /* validate changed params against current layout */ |
79 | err = ceph_do_getattr(file->f_dentry->d_inode, CEPH_STAT_CAP_LAYOUT); | 79 | err = ceph_do_getattr(file_inode(file), CEPH_STAT_CAP_LAYOUT); |
80 | if (err) | 80 | if (err) |
81 | return err; | 81 | return err; |
82 | 82 | ||
@@ -136,7 +136,7 @@ static long ceph_ioctl_set_layout(struct file *file, void __user *arg) | |||
136 | */ | 136 | */ |
137 | static long ceph_ioctl_set_layout_policy (struct file *file, void __user *arg) | 137 | static long ceph_ioctl_set_layout_policy (struct file *file, void __user *arg) |
138 | { | 138 | { |
139 | struct inode *inode = file->f_dentry->d_inode; | 139 | struct inode *inode = file_inode(file); |
140 | struct ceph_mds_request *req; | 140 | struct ceph_mds_request *req; |
141 | struct ceph_ioctl_layout l; | 141 | struct ceph_ioctl_layout l; |
142 | int err; | 142 | int err; |
@@ -179,7 +179,7 @@ static long ceph_ioctl_set_layout_policy (struct file *file, void __user *arg) | |||
179 | static long ceph_ioctl_get_dataloc(struct file *file, void __user *arg) | 179 | static long ceph_ioctl_get_dataloc(struct file *file, void __user *arg) |
180 | { | 180 | { |
181 | struct ceph_ioctl_dataloc dl; | 181 | struct ceph_ioctl_dataloc dl; |
182 | struct inode *inode = file->f_dentry->d_inode; | 182 | struct inode *inode = file_inode(file); |
183 | struct ceph_inode_info *ci = ceph_inode(inode); | 183 | struct ceph_inode_info *ci = ceph_inode(inode); |
184 | struct ceph_osd_client *osdc = | 184 | struct ceph_osd_client *osdc = |
185 | &ceph_sb_to_client(inode->i_sb)->client->osdc; | 185 | &ceph_sb_to_client(inode->i_sb)->client->osdc; |
@@ -234,7 +234,7 @@ static long ceph_ioctl_get_dataloc(struct file *file, void __user *arg) | |||
234 | static long ceph_ioctl_lazyio(struct file *file) | 234 | static long ceph_ioctl_lazyio(struct file *file) |
235 | { | 235 | { |
236 | struct ceph_file_info *fi = file->private_data; | 236 | struct ceph_file_info *fi = file->private_data; |
237 | struct inode *inode = file->f_dentry->d_inode; | 237 | struct inode *inode = file_inode(file); |
238 | struct ceph_inode_info *ci = ceph_inode(inode); | 238 | struct ceph_inode_info *ci = ceph_inode(inode); |
239 | 239 | ||
240 | if ((fi->fmode & CEPH_FILE_MODE_LAZY) == 0) { | 240 | if ((fi->fmode & CEPH_FILE_MODE_LAZY) == 0) { |