diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-26 23:16:07 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-26 23:16:07 -0500 |
commit | d895cb1af15c04c522a25c79cc429076987c089b (patch) | |
tree | 895dc9157e28f603d937a58be664e4e440d5530c /fs/ceph | |
parent | 9626357371b519f2b955fef399647181034a77fe (diff) | |
parent | d3d009cb965eae7e002ea5badf603ea8f4c34915 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs pile (part one) from Al Viro:
"Assorted stuff - cleaning namei.c up a bit, fixing ->d_name/->d_parent
locking violations, etc.
The most visible changes here are death of FS_REVAL_DOT (replaced with
"has ->d_weak_revalidate()") and a new helper getting from struct file
to inode. Some bits of preparation to xattr method interface changes.
Misc patches by various people sent this cycle *and* ocfs2 fixes from
several cycles ago that should've been upstream right then.
PS: the next vfs pile will be xattr stuff."
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (46 commits)
saner proc_get_inode() calling conventions
proc: avoid extra pde_put() in proc_fill_super()
fs: change return values from -EACCES to -EPERM
fs/exec.c: make bprm_mm_init() static
ocfs2/dlm: use GFP_ATOMIC inside a spin_lock
ocfs2: fix possible use-after-free with AIO
ocfs2: Fix oops in ocfs2_fast_symlink_readpage() code path
get_empty_filp()/alloc_file() leave both ->f_pos and ->f_version zero
target: writev() on single-element vector is pointless
export kernel_write(), convert open-coded instances
fs: encode_fh: return FILEID_INVALID if invalid fid_type
kill f_vfsmnt
vfs: kill FS_REVAL_DOT by adding a d_weak_revalidate dentry op
nfsd: handle vfs_getattr errors in acl protocol
switch vfs_getattr() to struct path
default SET_PERSONALITY() in linux/elf.h
ceph: prepopulate inodes only when request is aborted
d_hash_and_lookup(): export, switch open-coded instances
9p: switch v9fs_set_create_acl() to inode+fid, do it before d_instantiate()
9p: split dropping the acls from v9fs_set_create_acl()
...
Diffstat (limited to 'fs/ceph')
-rw-r--r-- | fs/ceph/addr.c | 12 | ||||
-rw-r--r-- | fs/ceph/dir.c | 6 | ||||
-rw-r--r-- | fs/ceph/export.c | 4 | ||||
-rw-r--r-- | fs/ceph/file.c | 10 | ||||
-rw-r--r-- | fs/ceph/inode.c | 40 | ||||
-rw-r--r-- | fs/ceph/ioctl.c | 16 | ||||
-rw-r--r-- | fs/ceph/locks.c | 2 |
7 files changed, 63 insertions, 27 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 | */ |
196 | static int readpage_nounlock(struct file *filp, struct page *page) | 196 | static 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: | |||
370 | static int ceph_readpages(struct file *file, struct address_space *mapping, | 370 | static 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 | */ |
1229 | static int ceph_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) | 1229 | static 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); |
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index 8c1aabe93b67..6d797f46d772 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c | |||
@@ -238,7 +238,7 @@ static int note_last_dentry(struct ceph_file_info *fi, const char *name, | |||
238 | static int ceph_readdir(struct file *filp, void *dirent, filldir_t filldir) | 238 | static int ceph_readdir(struct file *filp, void *dirent, filldir_t filldir) |
239 | { | 239 | { |
240 | struct ceph_file_info *fi = filp->private_data; | 240 | struct ceph_file_info *fi = filp->private_data; |
241 | struct inode *inode = filp->f_dentry->d_inode; | 241 | struct inode *inode = file_inode(filp); |
242 | struct ceph_inode_info *ci = ceph_inode(inode); | 242 | struct ceph_inode_info *ci = ceph_inode(inode); |
243 | struct ceph_fs_client *fsc = ceph_inode_to_client(inode); | 243 | struct ceph_fs_client *fsc = ceph_inode_to_client(inode); |
244 | struct ceph_mds_client *mdsc = fsc->mdsc; | 244 | struct ceph_mds_client *mdsc = fsc->mdsc; |
@@ -1138,7 +1138,7 @@ static ssize_t ceph_read_dir(struct file *file, char __user *buf, size_t size, | |||
1138 | loff_t *ppos) | 1138 | loff_t *ppos) |
1139 | { | 1139 | { |
1140 | struct ceph_file_info *cf = file->private_data; | 1140 | struct ceph_file_info *cf = file->private_data; |
1141 | struct inode *inode = file->f_dentry->d_inode; | 1141 | struct inode *inode = file_inode(file); |
1142 | struct ceph_inode_info *ci = ceph_inode(inode); | 1142 | struct ceph_inode_info *ci = ceph_inode(inode); |
1143 | int left; | 1143 | int left; |
1144 | const int bufsize = 1024; | 1144 | const int bufsize = 1024; |
@@ -1188,7 +1188,7 @@ static ssize_t ceph_read_dir(struct file *file, char __user *buf, size_t size, | |||
1188 | static int ceph_dir_fsync(struct file *file, loff_t start, loff_t end, | 1188 | static int ceph_dir_fsync(struct file *file, loff_t start, loff_t end, |
1189 | int datasync) | 1189 | int datasync) |
1190 | { | 1190 | { |
1191 | struct inode *inode = file->f_path.dentry->d_inode; | 1191 | struct inode *inode = file_inode(file); |
1192 | struct ceph_inode_info *ci = ceph_inode(inode); | 1192 | struct ceph_inode_info *ci = ceph_inode(inode); |
1193 | struct list_head *head = &ci->i_unsafe_dirops; | 1193 | struct list_head *head = &ci->i_unsafe_dirops; |
1194 | struct ceph_mds_request *req; | 1194 | struct ceph_mds_request *req; |
diff --git a/fs/ceph/export.c b/fs/ceph/export.c index ca3ab3f9ca70..16796be53ca5 100644 --- a/fs/ceph/export.c +++ b/fs/ceph/export.c | |||
@@ -81,7 +81,7 @@ static int ceph_encode_fh(struct inode *inode, u32 *rawfh, int *max_len, | |||
81 | if (parent_inode) { | 81 | if (parent_inode) { |
82 | /* nfsd wants connectable */ | 82 | /* nfsd wants connectable */ |
83 | *max_len = connected_handle_length; | 83 | *max_len = connected_handle_length; |
84 | type = 255; | 84 | type = FILEID_INVALID; |
85 | } else { | 85 | } else { |
86 | dout("encode_fh %p\n", dentry); | 86 | dout("encode_fh %p\n", dentry); |
87 | fh->ino = ceph_ino(inode); | 87 | fh->ino = ceph_ino(inode); |
@@ -90,7 +90,7 @@ static int ceph_encode_fh(struct inode *inode, u32 *rawfh, int *max_len, | |||
90 | } | 90 | } |
91 | } else { | 91 | } else { |
92 | *max_len = handle_length; | 92 | *max_len = handle_length; |
93 | type = 255; | 93 | type = FILEID_INVALID; |
94 | } | 94 | } |
95 | if (dentry) | 95 | if (dentry) |
96 | dput(dentry); | 96 | dput(dentry); |
diff --git a/fs/ceph/file.c b/fs/ceph/file.c index e51558fca3a3..11b57c2c8f15 100644 --- a/fs/ceph/file.c +++ b/fs/ceph/file.c | |||
@@ -393,7 +393,7 @@ more: | |||
393 | static ssize_t ceph_sync_read(struct file *file, char __user *data, | 393 | static ssize_t ceph_sync_read(struct file *file, char __user *data, |
394 | unsigned len, loff_t *poff, int *checkeof) | 394 | unsigned len, loff_t *poff, int *checkeof) |
395 | { | 395 | { |
396 | struct inode *inode = file->f_dentry->d_inode; | 396 | struct inode *inode = file_inode(file); |
397 | struct page **pages; | 397 | struct page **pages; |
398 | u64 off = *poff; | 398 | u64 off = *poff; |
399 | int num_pages, ret; | 399 | int num_pages, ret; |
@@ -466,7 +466,7 @@ static void sync_write_commit(struct ceph_osd_request *req, | |||
466 | static ssize_t ceph_sync_write(struct file *file, const char __user *data, | 466 | static ssize_t ceph_sync_write(struct file *file, const char __user *data, |
467 | size_t left, loff_t *offset) | 467 | size_t left, loff_t *offset) |
468 | { | 468 | { |
469 | struct inode *inode = file->f_dentry->d_inode; | 469 | struct inode *inode = file_inode(file); |
470 | struct ceph_inode_info *ci = ceph_inode(inode); | 470 | struct ceph_inode_info *ci = ceph_inode(inode); |
471 | struct ceph_fs_client *fsc = ceph_inode_to_client(inode); | 471 | struct ceph_fs_client *fsc = ceph_inode_to_client(inode); |
472 | struct ceph_osd_request *req; | 472 | struct ceph_osd_request *req; |
@@ -483,7 +483,7 @@ static ssize_t ceph_sync_write(struct file *file, const char __user *data, | |||
483 | int ret; | 483 | int ret; |
484 | struct timespec mtime = CURRENT_TIME; | 484 | struct timespec mtime = CURRENT_TIME; |
485 | 485 | ||
486 | if (ceph_snap(file->f_dentry->d_inode) != CEPH_NOSNAP) | 486 | if (ceph_snap(file_inode(file)) != CEPH_NOSNAP) |
487 | return -EROFS; | 487 | return -EROFS; |
488 | 488 | ||
489 | dout("sync_write on file %p %lld~%u %s\n", file, *offset, | 489 | dout("sync_write on file %p %lld~%u %s\n", file, *offset, |
@@ -637,7 +637,7 @@ static ssize_t ceph_aio_read(struct kiocb *iocb, const struct iovec *iov, | |||
637 | struct ceph_file_info *fi = filp->private_data; | 637 | struct ceph_file_info *fi = filp->private_data; |
638 | loff_t *ppos = &iocb->ki_pos; | 638 | loff_t *ppos = &iocb->ki_pos; |
639 | size_t len = iov->iov_len; | 639 | size_t len = iov->iov_len; |
640 | struct inode *inode = filp->f_dentry->d_inode; | 640 | struct inode *inode = file_inode(filp); |
641 | struct ceph_inode_info *ci = ceph_inode(inode); | 641 | struct ceph_inode_info *ci = ceph_inode(inode); |
642 | void __user *base = iov->iov_base; | 642 | void __user *base = iov->iov_base; |
643 | ssize_t ret; | 643 | ssize_t ret; |
@@ -707,7 +707,7 @@ static ssize_t ceph_aio_write(struct kiocb *iocb, const struct iovec *iov, | |||
707 | { | 707 | { |
708 | struct file *file = iocb->ki_filp; | 708 | struct file *file = iocb->ki_filp; |
709 | struct ceph_file_info *fi = file->private_data; | 709 | struct ceph_file_info *fi = file->private_data; |
710 | struct inode *inode = file->f_dentry->d_inode; | 710 | struct inode *inode = file_inode(file); |
711 | struct ceph_inode_info *ci = ceph_inode(inode); | 711 | struct ceph_inode_info *ci = ceph_inode(inode); |
712 | struct ceph_osd_client *osdc = | 712 | struct ceph_osd_client *osdc = |
713 | &ceph_sb_to_client(inode->i_sb)->client->osdc; | 713 | &ceph_sb_to_client(inode->i_sb)->client->osdc; |
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index d45895f4a04d..851814d951cd 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c | |||
@@ -1131,8 +1131,8 @@ int ceph_fill_trace(struct super_block *sb, struct ceph_mds_request *req, | |||
1131 | req->r_request_started); | 1131 | req->r_request_started); |
1132 | dout(" final dn %p\n", dn); | 1132 | dout(" final dn %p\n", dn); |
1133 | i++; | 1133 | i++; |
1134 | } else if (req->r_op == CEPH_MDS_OP_LOOKUPSNAP || | 1134 | } else if ((req->r_op == CEPH_MDS_OP_LOOKUPSNAP || |
1135 | req->r_op == CEPH_MDS_OP_MKSNAP) { | 1135 | req->r_op == CEPH_MDS_OP_MKSNAP) && !req->r_aborted) { |
1136 | struct dentry *dn = req->r_dentry; | 1136 | struct dentry *dn = req->r_dentry; |
1137 | 1137 | ||
1138 | /* fill out a snapdir LOOKUPSNAP dentry */ | 1138 | /* fill out a snapdir LOOKUPSNAP dentry */ |
@@ -1196,6 +1196,39 @@ done: | |||
1196 | /* | 1196 | /* |
1197 | * Prepopulate our cache with readdir results, leases, etc. | 1197 | * Prepopulate our cache with readdir results, leases, etc. |
1198 | */ | 1198 | */ |
1199 | static int readdir_prepopulate_inodes_only(struct ceph_mds_request *req, | ||
1200 | struct ceph_mds_session *session) | ||
1201 | { | ||
1202 | struct ceph_mds_reply_info_parsed *rinfo = &req->r_reply_info; | ||
1203 | int i, err = 0; | ||
1204 | |||
1205 | for (i = 0; i < rinfo->dir_nr; i++) { | ||
1206 | struct ceph_vino vino; | ||
1207 | struct inode *in; | ||
1208 | int rc; | ||
1209 | |||
1210 | vino.ino = le64_to_cpu(rinfo->dir_in[i].in->ino); | ||
1211 | vino.snap = le64_to_cpu(rinfo->dir_in[i].in->snapid); | ||
1212 | |||
1213 | in = ceph_get_inode(req->r_dentry->d_sb, vino); | ||
1214 | if (IS_ERR(in)) { | ||
1215 | err = PTR_ERR(in); | ||
1216 | dout("new_inode badness got %d\n", err); | ||
1217 | continue; | ||
1218 | } | ||
1219 | rc = fill_inode(in, &rinfo->dir_in[i], NULL, session, | ||
1220 | req->r_request_started, -1, | ||
1221 | &req->r_caps_reservation); | ||
1222 | if (rc < 0) { | ||
1223 | pr_err("fill_inode badness on %p got %d\n", in, rc); | ||
1224 | err = rc; | ||
1225 | continue; | ||
1226 | } | ||
1227 | } | ||
1228 | |||
1229 | return err; | ||
1230 | } | ||
1231 | |||
1199 | int ceph_readdir_prepopulate(struct ceph_mds_request *req, | 1232 | int ceph_readdir_prepopulate(struct ceph_mds_request *req, |
1200 | struct ceph_mds_session *session) | 1233 | struct ceph_mds_session *session) |
1201 | { | 1234 | { |
@@ -1210,6 +1243,9 @@ int ceph_readdir_prepopulate(struct ceph_mds_request *req, | |||
1210 | u64 frag = le32_to_cpu(rhead->args.readdir.frag); | 1243 | u64 frag = le32_to_cpu(rhead->args.readdir.frag); |
1211 | struct ceph_dentry_info *di; | 1244 | struct ceph_dentry_info *di; |
1212 | 1245 | ||
1246 | if (req->r_aborted) | ||
1247 | return readdir_prepopulate_inodes_only(req, session); | ||
1248 | |||
1213 | if (le32_to_cpu(rinfo->head->op) == CEPH_MDS_OP_LSSNAP) { | 1249 | if (le32_to_cpu(rinfo->head->op) == CEPH_MDS_OP_LSSNAP) { |
1214 | snapdir = ceph_get_snapdir(parent->d_inode); | 1250 | snapdir = ceph_get_snapdir(parent->d_inode); |
1215 | parent = d_find_alias(snapdir); | 1251 | parent = d_find_alias(snapdir); |
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) { |
diff --git a/fs/ceph/locks.c b/fs/ceph/locks.c index 80576d05d687..202dd3d68be0 100644 --- a/fs/ceph/locks.c +++ b/fs/ceph/locks.c | |||
@@ -13,7 +13,7 @@ | |||
13 | static int ceph_lock_message(u8 lock_type, u16 operation, struct file *file, | 13 | static int ceph_lock_message(u8 lock_type, u16 operation, struct file *file, |
14 | int cmd, u8 wait, struct file_lock *fl) | 14 | int cmd, u8 wait, struct file_lock *fl) |
15 | { | 15 | { |
16 | struct inode *inode = file->f_dentry->d_inode; | 16 | struct inode *inode = file_inode(file); |
17 | struct ceph_mds_client *mdsc = | 17 | struct ceph_mds_client *mdsc = |
18 | ceph_sb_to_client(inode->i_sb)->mdsc; | 18 | ceph_sb_to_client(inode->i_sb)->mdsc; |
19 | struct ceph_mds_request *req; | 19 | struct ceph_mds_request *req; |