diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-26 18:48:49 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-26 20:22:07 -0400 |
commit | 9ec3a646fe09970f801ab15e0f1694060b9f19af (patch) | |
tree | 697058ca7e1671eda180a3ccc62445686fbc1a31 /fs/ceph | |
parent | c8b3fd0ce313443731e8fd6d5a541085eb465f99 (diff) | |
parent | 3cab989afd8d8d1bc3d99fef0e7ed87c31e7b647 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull fourth vfs update from Al Viro:
"d_inode() annotations from David Howells (sat in for-next since before
the beginning of merge window) + four assorted fixes"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
RCU pathwalk breakage when running into a symlink overmounting something
fix I_DIO_WAKEUP definition
direct-io: only inc/dec inode->i_dio_count for file systems
fs/9p: fix readdir()
VFS: assorted d_backing_inode() annotations
VFS: fs/inode.c helpers: d_inode() annotations
VFS: fs/cachefiles: d_backing_inode() annotations
VFS: fs library helpers: d_inode() annotations
VFS: assorted weird filesystems: d_inode() annotations
VFS: normal filesystems (and lustre): d_inode() annotations
VFS: security/: d_inode() annotations
VFS: security/: d_backing_inode() annotations
VFS: net/: d_inode() annotations
VFS: net/unix: d_backing_inode() annotations
VFS: kernel/: d_inode() annotations
VFS: audit: d_backing_inode() annotations
VFS: Fix up some ->d_inode accesses in the chelsio driver
VFS: Cachefiles should perform fs modifications on the top layer only
VFS: AF_UNIX sockets should call mknod on the top layer only
Diffstat (limited to 'fs/ceph')
-rw-r--r-- | fs/ceph/caps.c | 2 | ||||
-rw-r--r-- | fs/ceph/debugfs.c | 2 | ||||
-rw-r--r-- | fs/ceph/dir.c | 60 | ||||
-rw-r--r-- | fs/ceph/export.c | 28 | ||||
-rw-r--r-- | fs/ceph/file.c | 4 | ||||
-rw-r--r-- | fs/ceph/inode.c | 52 | ||||
-rw-r--r-- | fs/ceph/mds_client.c | 24 | ||||
-rw-r--r-- | fs/ceph/super.c | 4 | ||||
-rw-r--r-- | fs/ceph/xattr.c | 16 |
9 files changed, 96 insertions, 96 deletions
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index 11631c4c7d14..be5ea6af8366 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c | |||
@@ -3422,7 +3422,7 @@ int ceph_encode_inode_release(void **p, struct inode *inode, | |||
3422 | int ceph_encode_dentry_release(void **p, struct dentry *dentry, | 3422 | int ceph_encode_dentry_release(void **p, struct dentry *dentry, |
3423 | int mds, int drop, int unless) | 3423 | int mds, int drop, int unless) |
3424 | { | 3424 | { |
3425 | struct inode *dir = dentry->d_parent->d_inode; | 3425 | struct inode *dir = d_inode(dentry->d_parent); |
3426 | struct ceph_mds_request_release *rel = *p; | 3426 | struct ceph_mds_request_release *rel = *p; |
3427 | struct ceph_dentry_info *di = ceph_dentry(dentry); | 3427 | struct ceph_dentry_info *di = ceph_dentry(dentry); |
3428 | int force = 0; | 3428 | int force = 0; |
diff --git a/fs/ceph/debugfs.c b/fs/ceph/debugfs.c index 1b2355109b9f..31f831471ed2 100644 --- a/fs/ceph/debugfs.c +++ b/fs/ceph/debugfs.c | |||
@@ -84,7 +84,7 @@ static int mdsc_show(struct seq_file *s, void *p) | |||
84 | path = NULL; | 84 | path = NULL; |
85 | spin_lock(&req->r_dentry->d_lock); | 85 | spin_lock(&req->r_dentry->d_lock); |
86 | seq_printf(s, " #%llx/%pd (%s)", | 86 | seq_printf(s, " #%llx/%pd (%s)", |
87 | ceph_ino(req->r_dentry->d_parent->d_inode), | 87 | ceph_ino(d_inode(req->r_dentry->d_parent)), |
88 | req->r_dentry, | 88 | req->r_dentry, |
89 | path ? path : ""); | 89 | path ? path : ""); |
90 | spin_unlock(&req->r_dentry->d_lock); | 90 | spin_unlock(&req->r_dentry->d_lock); |
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index e729b79812b4..4248307fea90 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c | |||
@@ -49,9 +49,9 @@ int ceph_init_dentry(struct dentry *dentry) | |||
49 | goto out_unlock; | 49 | goto out_unlock; |
50 | } | 50 | } |
51 | 51 | ||
52 | if (ceph_snap(dentry->d_parent->d_inode) == CEPH_NOSNAP) | 52 | if (ceph_snap(d_inode(dentry->d_parent)) == CEPH_NOSNAP) |
53 | d_set_d_op(dentry, &ceph_dentry_ops); | 53 | d_set_d_op(dentry, &ceph_dentry_ops); |
54 | else if (ceph_snap(dentry->d_parent->d_inode) == CEPH_SNAPDIR) | 54 | else if (ceph_snap(d_inode(dentry->d_parent)) == CEPH_SNAPDIR) |
55 | d_set_d_op(dentry, &ceph_snapdir_dentry_ops); | 55 | d_set_d_op(dentry, &ceph_snapdir_dentry_ops); |
56 | else | 56 | else |
57 | d_set_d_op(dentry, &ceph_snap_dentry_ops); | 57 | d_set_d_op(dentry, &ceph_snap_dentry_ops); |
@@ -77,7 +77,7 @@ struct inode *ceph_get_dentry_parent_inode(struct dentry *dentry) | |||
77 | 77 | ||
78 | spin_lock(&dentry->d_lock); | 78 | spin_lock(&dentry->d_lock); |
79 | if (!IS_ROOT(dentry)) { | 79 | if (!IS_ROOT(dentry)) { |
80 | inode = dentry->d_parent->d_inode; | 80 | inode = d_inode(dentry->d_parent); |
81 | ihold(inode); | 81 | ihold(inode); |
82 | } | 82 | } |
83 | spin_unlock(&dentry->d_lock); | 83 | spin_unlock(&dentry->d_lock); |
@@ -122,7 +122,7 @@ static int __dcache_readdir(struct file *file, struct dir_context *ctx, | |||
122 | { | 122 | { |
123 | struct ceph_file_info *fi = file->private_data; | 123 | struct ceph_file_info *fi = file->private_data; |
124 | struct dentry *parent = file->f_path.dentry; | 124 | struct dentry *parent = file->f_path.dentry; |
125 | struct inode *dir = parent->d_inode; | 125 | struct inode *dir = d_inode(parent); |
126 | struct list_head *p; | 126 | struct list_head *p; |
127 | struct dentry *dentry, *last; | 127 | struct dentry *dentry, *last; |
128 | struct ceph_dentry_info *di; | 128 | struct ceph_dentry_info *di; |
@@ -161,15 +161,15 @@ more: | |||
161 | } | 161 | } |
162 | spin_lock_nested(&dentry->d_lock, DENTRY_D_LOCK_NESTED); | 162 | spin_lock_nested(&dentry->d_lock, DENTRY_D_LOCK_NESTED); |
163 | if (di->lease_shared_gen == shared_gen && | 163 | if (di->lease_shared_gen == shared_gen && |
164 | !d_unhashed(dentry) && dentry->d_inode && | 164 | !d_unhashed(dentry) && d_really_is_positive(dentry) && |
165 | ceph_snap(dentry->d_inode) != CEPH_SNAPDIR && | 165 | ceph_snap(d_inode(dentry)) != CEPH_SNAPDIR && |
166 | ceph_ino(dentry->d_inode) != CEPH_INO_CEPH && | 166 | ceph_ino(d_inode(dentry)) != CEPH_INO_CEPH && |
167 | fpos_cmp(ctx->pos, di->offset) <= 0) | 167 | fpos_cmp(ctx->pos, di->offset) <= 0) |
168 | break; | 168 | break; |
169 | dout(" skipping %p %pd at %llu (%llu)%s%s\n", dentry, | 169 | dout(" skipping %p %pd at %llu (%llu)%s%s\n", dentry, |
170 | dentry, di->offset, | 170 | dentry, di->offset, |
171 | ctx->pos, d_unhashed(dentry) ? " unhashed" : "", | 171 | ctx->pos, d_unhashed(dentry) ? " unhashed" : "", |
172 | !dentry->d_inode ? " null" : ""); | 172 | !d_inode(dentry) ? " null" : ""); |
173 | spin_unlock(&dentry->d_lock); | 173 | spin_unlock(&dentry->d_lock); |
174 | p = p->prev; | 174 | p = p->prev; |
175 | dentry = list_entry(p, struct dentry, d_child); | 175 | dentry = list_entry(p, struct dentry, d_child); |
@@ -189,11 +189,11 @@ more: | |||
189 | } | 189 | } |
190 | 190 | ||
191 | dout(" %llu (%llu) dentry %p %pd %p\n", di->offset, ctx->pos, | 191 | dout(" %llu (%llu) dentry %p %pd %p\n", di->offset, ctx->pos, |
192 | dentry, dentry, dentry->d_inode); | 192 | dentry, dentry, d_inode(dentry)); |
193 | if (!dir_emit(ctx, dentry->d_name.name, | 193 | if (!dir_emit(ctx, dentry->d_name.name, |
194 | dentry->d_name.len, | 194 | dentry->d_name.len, |
195 | ceph_translate_ino(dentry->d_sb, dentry->d_inode->i_ino), | 195 | ceph_translate_ino(dentry->d_sb, d_inode(dentry)->i_ino), |
196 | dentry->d_inode->i_mode >> 12)) { | 196 | d_inode(dentry)->i_mode >> 12)) { |
197 | if (last) { | 197 | if (last) { |
198 | /* remember our position */ | 198 | /* remember our position */ |
199 | fi->dentry = last; | 199 | fi->dentry = last; |
@@ -543,7 +543,7 @@ int ceph_handle_snapdir(struct ceph_mds_request *req, | |||
543 | struct dentry *dentry, int err) | 543 | struct dentry *dentry, int err) |
544 | { | 544 | { |
545 | struct ceph_fs_client *fsc = ceph_sb_to_client(dentry->d_sb); | 545 | struct ceph_fs_client *fsc = ceph_sb_to_client(dentry->d_sb); |
546 | struct inode *parent = dentry->d_parent->d_inode; /* we hold i_mutex */ | 546 | struct inode *parent = d_inode(dentry->d_parent); /* we hold i_mutex */ |
547 | 547 | ||
548 | /* .snap dir? */ | 548 | /* .snap dir? */ |
549 | if (err == -ENOENT && | 549 | if (err == -ENOENT && |
@@ -579,8 +579,8 @@ struct dentry *ceph_finish_lookup(struct ceph_mds_request *req, | |||
579 | err = 0; | 579 | err = 0; |
580 | if (!req->r_reply_info.head->is_dentry) { | 580 | if (!req->r_reply_info.head->is_dentry) { |
581 | dout("ENOENT and no trace, dentry %p inode %p\n", | 581 | dout("ENOENT and no trace, dentry %p inode %p\n", |
582 | dentry, dentry->d_inode); | 582 | dentry, d_inode(dentry)); |
583 | if (dentry->d_inode) { | 583 | if (d_really_is_positive(dentry)) { |
584 | d_drop(dentry); | 584 | d_drop(dentry); |
585 | err = -ENOENT; | 585 | err = -ENOENT; |
586 | } else { | 586 | } else { |
@@ -627,7 +627,7 @@ static struct dentry *ceph_lookup(struct inode *dir, struct dentry *dentry, | |||
627 | return ERR_PTR(err); | 627 | return ERR_PTR(err); |
628 | 628 | ||
629 | /* can we conclude ENOENT locally? */ | 629 | /* can we conclude ENOENT locally? */ |
630 | if (dentry->d_inode == NULL) { | 630 | if (d_really_is_negative(dentry)) { |
631 | struct ceph_inode_info *ci = ceph_inode(dir); | 631 | struct ceph_inode_info *ci = ceph_inode(dir); |
632 | struct ceph_dentry_info *di = ceph_dentry(dentry); | 632 | struct ceph_dentry_info *di = ceph_dentry(dentry); |
633 | 633 | ||
@@ -734,7 +734,7 @@ static int ceph_mknod(struct inode *dir, struct dentry *dentry, | |||
734 | ceph_mdsc_put_request(req); | 734 | ceph_mdsc_put_request(req); |
735 | out: | 735 | out: |
736 | if (!err) | 736 | if (!err) |
737 | ceph_init_inode_acls(dentry->d_inode, &acls); | 737 | ceph_init_inode_acls(d_inode(dentry), &acls); |
738 | else | 738 | else |
739 | d_drop(dentry); | 739 | d_drop(dentry); |
740 | ceph_release_acls_info(&acls); | 740 | ceph_release_acls_info(&acls); |
@@ -835,7 +835,7 @@ static int ceph_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) | |||
835 | ceph_mdsc_put_request(req); | 835 | ceph_mdsc_put_request(req); |
836 | out: | 836 | out: |
837 | if (!err) | 837 | if (!err) |
838 | ceph_init_inode_acls(dentry->d_inode, &acls); | 838 | ceph_init_inode_acls(d_inode(dentry), &acls); |
839 | else | 839 | else |
840 | d_drop(dentry); | 840 | d_drop(dentry); |
841 | ceph_release_acls_info(&acls); | 841 | ceph_release_acls_info(&acls); |
@@ -872,8 +872,8 @@ static int ceph_link(struct dentry *old_dentry, struct inode *dir, | |||
872 | if (err) { | 872 | if (err) { |
873 | d_drop(dentry); | 873 | d_drop(dentry); |
874 | } else if (!req->r_reply_info.head->is_dentry) { | 874 | } else if (!req->r_reply_info.head->is_dentry) { |
875 | ihold(old_dentry->d_inode); | 875 | ihold(d_inode(old_dentry)); |
876 | d_instantiate(dentry, old_dentry->d_inode); | 876 | d_instantiate(dentry, d_inode(old_dentry)); |
877 | } | 877 | } |
878 | ceph_mdsc_put_request(req); | 878 | ceph_mdsc_put_request(req); |
879 | return err; | 879 | return err; |
@@ -906,7 +906,7 @@ static int ceph_unlink(struct inode *dir, struct dentry *dentry) | |||
906 | { | 906 | { |
907 | struct ceph_fs_client *fsc = ceph_sb_to_client(dir->i_sb); | 907 | struct ceph_fs_client *fsc = ceph_sb_to_client(dir->i_sb); |
908 | struct ceph_mds_client *mdsc = fsc->mdsc; | 908 | struct ceph_mds_client *mdsc = fsc->mdsc; |
909 | struct inode *inode = dentry->d_inode; | 909 | struct inode *inode = d_inode(dentry); |
910 | struct ceph_mds_request *req; | 910 | struct ceph_mds_request *req; |
911 | int err = -EROFS; | 911 | int err = -EROFS; |
912 | int op; | 912 | int op; |
@@ -975,8 +975,8 @@ static int ceph_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
975 | req->r_dentry_unless = CEPH_CAP_FILE_EXCL; | 975 | req->r_dentry_unless = CEPH_CAP_FILE_EXCL; |
976 | /* release LINK_RDCACHE on source inode (mds will lock it) */ | 976 | /* release LINK_RDCACHE on source inode (mds will lock it) */ |
977 | req->r_old_inode_drop = CEPH_CAP_LINK_SHARED; | 977 | req->r_old_inode_drop = CEPH_CAP_LINK_SHARED; |
978 | if (new_dentry->d_inode) | 978 | if (d_really_is_positive(new_dentry)) |
979 | req->r_inode_drop = drop_caps_for_unlink(new_dentry->d_inode); | 979 | req->r_inode_drop = drop_caps_for_unlink(d_inode(new_dentry)); |
980 | err = ceph_mdsc_do_request(mdsc, old_dir, req); | 980 | err = ceph_mdsc_do_request(mdsc, old_dir, req); |
981 | if (!err && !req->r_reply_info.head->is_dentry) { | 981 | if (!err && !req->r_reply_info.head->is_dentry) { |
982 | /* | 982 | /* |
@@ -1042,7 +1042,7 @@ static int dentry_lease_is_valid(struct dentry *dentry) | |||
1042 | if (di->lease_renew_after && | 1042 | if (di->lease_renew_after && |
1043 | time_after(jiffies, di->lease_renew_after)) { | 1043 | time_after(jiffies, di->lease_renew_after)) { |
1044 | /* we should renew */ | 1044 | /* we should renew */ |
1045 | dir = dentry->d_parent->d_inode; | 1045 | dir = d_inode(dentry->d_parent); |
1046 | session = ceph_get_mds_session(s); | 1046 | session = ceph_get_mds_session(s); |
1047 | seq = di->lease_seq; | 1047 | seq = di->lease_seq; |
1048 | di->lease_renew_after = 0; | 1048 | di->lease_renew_after = 0; |
@@ -1092,22 +1092,22 @@ static int ceph_d_revalidate(struct dentry *dentry, unsigned int flags) | |||
1092 | return -ECHILD; | 1092 | return -ECHILD; |
1093 | 1093 | ||
1094 | dout("d_revalidate %p '%pd' inode %p offset %lld\n", dentry, | 1094 | dout("d_revalidate %p '%pd' inode %p offset %lld\n", dentry, |
1095 | dentry, dentry->d_inode, ceph_dentry(dentry)->offset); | 1095 | dentry, d_inode(dentry), ceph_dentry(dentry)->offset); |
1096 | 1096 | ||
1097 | dir = ceph_get_dentry_parent_inode(dentry); | 1097 | dir = ceph_get_dentry_parent_inode(dentry); |
1098 | 1098 | ||
1099 | /* always trust cached snapped dentries, snapdir dentry */ | 1099 | /* always trust cached snapped dentries, snapdir dentry */ |
1100 | if (ceph_snap(dir) != CEPH_NOSNAP) { | 1100 | if (ceph_snap(dir) != CEPH_NOSNAP) { |
1101 | dout("d_revalidate %p '%pd' inode %p is SNAPPED\n", dentry, | 1101 | dout("d_revalidate %p '%pd' inode %p is SNAPPED\n", dentry, |
1102 | dentry, dentry->d_inode); | 1102 | dentry, d_inode(dentry)); |
1103 | valid = 1; | 1103 | valid = 1; |
1104 | } else if (dentry->d_inode && | 1104 | } else if (d_really_is_positive(dentry) && |
1105 | ceph_snap(dentry->d_inode) == CEPH_SNAPDIR) { | 1105 | ceph_snap(d_inode(dentry)) == CEPH_SNAPDIR) { |
1106 | valid = 1; | 1106 | valid = 1; |
1107 | } else if (dentry_lease_is_valid(dentry) || | 1107 | } else if (dentry_lease_is_valid(dentry) || |
1108 | dir_lease_is_valid(dir, dentry)) { | 1108 | dir_lease_is_valid(dir, dentry)) { |
1109 | if (dentry->d_inode) | 1109 | if (d_really_is_positive(dentry)) |
1110 | valid = ceph_is_any_caps(dentry->d_inode); | 1110 | valid = ceph_is_any_caps(d_inode(dentry)); |
1111 | else | 1111 | else |
1112 | valid = 1; | 1112 | valid = 1; |
1113 | } | 1113 | } |
@@ -1169,7 +1169,7 @@ static void ceph_d_prune(struct dentry *dentry) | |||
1169 | * we hold d_lock, so d_parent is stable, and d_fsdata is never | 1169 | * we hold d_lock, so d_parent is stable, and d_fsdata is never |
1170 | * cleared until d_release | 1170 | * cleared until d_release |
1171 | */ | 1171 | */ |
1172 | ceph_dir_clear_complete(dentry->d_parent->d_inode); | 1172 | ceph_dir_clear_complete(d_inode(dentry->d_parent)); |
1173 | } | 1173 | } |
1174 | 1174 | ||
1175 | /* | 1175 | /* |
diff --git a/fs/ceph/export.c b/fs/ceph/export.c index 8d7d782f4382..fe02ae7f056a 100644 --- a/fs/ceph/export.c +++ b/fs/ceph/export.c | |||
@@ -136,8 +136,8 @@ static struct dentry *__get_parent(struct super_block *sb, | |||
136 | return ERR_CAST(req); | 136 | return ERR_CAST(req); |
137 | 137 | ||
138 | if (child) { | 138 | if (child) { |
139 | req->r_inode = child->d_inode; | 139 | req->r_inode = d_inode(child); |
140 | ihold(child->d_inode); | 140 | ihold(d_inode(child)); |
141 | } else { | 141 | } else { |
142 | req->r_ino1 = (struct ceph_vino) { | 142 | req->r_ino1 = (struct ceph_vino) { |
143 | .ino = ino, | 143 | .ino = ino, |
@@ -164,7 +164,7 @@ static struct dentry *__get_parent(struct super_block *sb, | |||
164 | return ERR_PTR(err); | 164 | return ERR_PTR(err); |
165 | } | 165 | } |
166 | dout("__get_parent ino %llx parent %p ino %llx.%llx\n", | 166 | dout("__get_parent ino %llx parent %p ino %llx.%llx\n", |
167 | child ? ceph_ino(child->d_inode) : ino, | 167 | child ? ceph_ino(d_inode(child)) : ino, |
168 | dentry, ceph_vinop(inode)); | 168 | dentry, ceph_vinop(inode)); |
169 | return dentry; | 169 | return dentry; |
170 | } | 170 | } |
@@ -172,11 +172,11 @@ static struct dentry *__get_parent(struct super_block *sb, | |||
172 | static struct dentry *ceph_get_parent(struct dentry *child) | 172 | static struct dentry *ceph_get_parent(struct dentry *child) |
173 | { | 173 | { |
174 | /* don't re-export snaps */ | 174 | /* don't re-export snaps */ |
175 | if (ceph_snap(child->d_inode) != CEPH_NOSNAP) | 175 | if (ceph_snap(d_inode(child)) != CEPH_NOSNAP) |
176 | return ERR_PTR(-EINVAL); | 176 | return ERR_PTR(-EINVAL); |
177 | 177 | ||
178 | dout("get_parent %p ino %llx.%llx\n", | 178 | dout("get_parent %p ino %llx.%llx\n", |
179 | child, ceph_vinop(child->d_inode)); | 179 | child, ceph_vinop(d_inode(child))); |
180 | return __get_parent(child->d_sb, child, 0); | 180 | return __get_parent(child->d_sb, child, 0); |
181 | } | 181 | } |
182 | 182 | ||
@@ -209,32 +209,32 @@ static int ceph_get_name(struct dentry *parent, char *name, | |||
209 | struct ceph_mds_request *req; | 209 | struct ceph_mds_request *req; |
210 | int err; | 210 | int err; |
211 | 211 | ||
212 | mdsc = ceph_inode_to_client(child->d_inode)->mdsc; | 212 | mdsc = ceph_inode_to_client(d_inode(child))->mdsc; |
213 | req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_LOOKUPNAME, | 213 | req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_LOOKUPNAME, |
214 | USE_ANY_MDS); | 214 | USE_ANY_MDS); |
215 | if (IS_ERR(req)) | 215 | if (IS_ERR(req)) |
216 | return PTR_ERR(req); | 216 | return PTR_ERR(req); |
217 | 217 | ||
218 | mutex_lock(&parent->d_inode->i_mutex); | 218 | mutex_lock(&d_inode(parent)->i_mutex); |
219 | 219 | ||
220 | req->r_inode = child->d_inode; | 220 | req->r_inode = d_inode(child); |
221 | ihold(child->d_inode); | 221 | ihold(d_inode(child)); |
222 | req->r_ino2 = ceph_vino(parent->d_inode); | 222 | req->r_ino2 = ceph_vino(d_inode(parent)); |
223 | req->r_locked_dir = parent->d_inode; | 223 | req->r_locked_dir = d_inode(parent); |
224 | req->r_num_caps = 2; | 224 | req->r_num_caps = 2; |
225 | err = ceph_mdsc_do_request(mdsc, NULL, req); | 225 | err = ceph_mdsc_do_request(mdsc, NULL, req); |
226 | 226 | ||
227 | mutex_unlock(&parent->d_inode->i_mutex); | 227 | mutex_unlock(&d_inode(parent)->i_mutex); |
228 | 228 | ||
229 | if (!err) { | 229 | if (!err) { |
230 | struct ceph_mds_reply_info_parsed *rinfo = &req->r_reply_info; | 230 | struct ceph_mds_reply_info_parsed *rinfo = &req->r_reply_info; |
231 | memcpy(name, rinfo->dname, rinfo->dname_len); | 231 | memcpy(name, rinfo->dname, rinfo->dname_len); |
232 | name[rinfo->dname_len] = 0; | 232 | name[rinfo->dname_len] = 0; |
233 | dout("get_name %p ino %llx.%llx name %s\n", | 233 | dout("get_name %p ino %llx.%llx name %s\n", |
234 | child, ceph_vinop(child->d_inode), name); | 234 | child, ceph_vinop(d_inode(child)), name); |
235 | } else { | 235 | } else { |
236 | dout("get_name %p ino %llx.%llx err %d\n", | 236 | dout("get_name %p ino %llx.%llx err %d\n", |
237 | child, ceph_vinop(child->d_inode), err); | 237 | child, ceph_vinop(d_inode(child)), err); |
238 | } | 238 | } |
239 | 239 | ||
240 | ceph_mdsc_put_request(req); | 240 | ceph_mdsc_put_request(req); |
diff --git a/fs/ceph/file.c b/fs/ceph/file.c index b9b8eb225f66..3b6b522b4b31 100644 --- a/fs/ceph/file.c +++ b/fs/ceph/file.c | |||
@@ -291,14 +291,14 @@ int ceph_atomic_open(struct inode *dir, struct dentry *dentry, | |||
291 | } | 291 | } |
292 | if (err) | 292 | if (err) |
293 | goto out_req; | 293 | goto out_req; |
294 | if (dn || dentry->d_inode == NULL || d_is_symlink(dentry)) { | 294 | if (dn || d_really_is_negative(dentry) || d_is_symlink(dentry)) { |
295 | /* make vfs retry on splice, ENOENT, or symlink */ | 295 | /* make vfs retry on splice, ENOENT, or symlink */ |
296 | dout("atomic_open finish_no_open on dn %p\n", dn); | 296 | dout("atomic_open finish_no_open on dn %p\n", dn); |
297 | err = finish_no_open(file, dn); | 297 | err = finish_no_open(file, dn); |
298 | } else { | 298 | } else { |
299 | dout("atomic_open finish_open on dn %p\n", dn); | 299 | dout("atomic_open finish_open on dn %p\n", dn); |
300 | if (req->r_op == CEPH_MDS_OP_CREATE && req->r_reply_info.has_create_ino) { | 300 | if (req->r_op == CEPH_MDS_OP_CREATE && req->r_reply_info.has_create_ino) { |
301 | ceph_init_inode_acls(dentry->d_inode, &acls); | 301 | ceph_init_inode_acls(d_inode(dentry), &acls); |
302 | *opened |= FILE_CREATED; | 302 | *opened |= FILE_CREATED; |
303 | } | 303 | } |
304 | err = finish_open(file, dentry, ceph_open, opened); | 304 | err = finish_open(file, dentry, ceph_open, opened); |
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index 119c43c80638..e876e1944519 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c | |||
@@ -940,7 +940,7 @@ static void update_dentry_lease(struct dentry *dentry, | |||
940 | dentry, duration, ttl); | 940 | dentry, duration, ttl); |
941 | 941 | ||
942 | /* make lease_rdcache_gen match directory */ | 942 | /* make lease_rdcache_gen match directory */ |
943 | dir = dentry->d_parent->d_inode; | 943 | dir = d_inode(dentry->d_parent); |
944 | di->lease_shared_gen = ceph_inode(dir)->i_shared_gen; | 944 | di->lease_shared_gen = ceph_inode(dir)->i_shared_gen; |
945 | 945 | ||
946 | if (duration == 0) | 946 | if (duration == 0) |
@@ -980,7 +980,7 @@ static struct dentry *splice_dentry(struct dentry *dn, struct inode *in, | |||
980 | { | 980 | { |
981 | struct dentry *realdn; | 981 | struct dentry *realdn; |
982 | 982 | ||
983 | BUG_ON(dn->d_inode); | 983 | BUG_ON(d_inode(dn)); |
984 | 984 | ||
985 | /* dn must be unhashed */ | 985 | /* dn must be unhashed */ |
986 | if (!d_unhashed(dn)) | 986 | if (!d_unhashed(dn)) |
@@ -998,13 +998,13 @@ static struct dentry *splice_dentry(struct dentry *dn, struct inode *in, | |||
998 | "inode %p ino %llx.%llx\n", | 998 | "inode %p ino %llx.%llx\n", |
999 | dn, d_count(dn), | 999 | dn, d_count(dn), |
1000 | realdn, d_count(realdn), | 1000 | realdn, d_count(realdn), |
1001 | realdn->d_inode, ceph_vinop(realdn->d_inode)); | 1001 | d_inode(realdn), ceph_vinop(d_inode(realdn))); |
1002 | dput(dn); | 1002 | dput(dn); |
1003 | dn = realdn; | 1003 | dn = realdn; |
1004 | } else { | 1004 | } else { |
1005 | BUG_ON(!ceph_dentry(dn)); | 1005 | BUG_ON(!ceph_dentry(dn)); |
1006 | dout("dn %p attached to %p ino %llx.%llx\n", | 1006 | dout("dn %p attached to %p ino %llx.%llx\n", |
1007 | dn, dn->d_inode, ceph_vinop(dn->d_inode)); | 1007 | dn, d_inode(dn), ceph_vinop(d_inode(dn))); |
1008 | } | 1008 | } |
1009 | if ((!prehash || *prehash) && d_unhashed(dn)) | 1009 | if ((!prehash || *prehash) && d_unhashed(dn)) |
1010 | d_rehash(dn); | 1010 | d_rehash(dn); |
@@ -1125,11 +1125,11 @@ retry_lookup: | |||
1125 | dput(parent); | 1125 | dput(parent); |
1126 | goto done; | 1126 | goto done; |
1127 | } | 1127 | } |
1128 | } else if (dn->d_inode && | 1128 | } else if (d_really_is_positive(dn) && |
1129 | (ceph_ino(dn->d_inode) != vino.ino || | 1129 | (ceph_ino(d_inode(dn)) != vino.ino || |
1130 | ceph_snap(dn->d_inode) != vino.snap)) { | 1130 | ceph_snap(d_inode(dn)) != vino.snap)) { |
1131 | dout(" dn %p points to wrong inode %p\n", | 1131 | dout(" dn %p points to wrong inode %p\n", |
1132 | dn, dn->d_inode); | 1132 | dn, d_inode(dn)); |
1133 | d_delete(dn); | 1133 | d_delete(dn); |
1134 | dput(dn); | 1134 | dput(dn); |
1135 | goto retry_lookup; | 1135 | goto retry_lookup; |
@@ -1183,7 +1183,7 @@ retry_lookup: | |||
1183 | 1183 | ||
1184 | BUG_ON(!dn); | 1184 | BUG_ON(!dn); |
1185 | BUG_ON(!dir); | 1185 | BUG_ON(!dir); |
1186 | BUG_ON(dn->d_parent->d_inode != dir); | 1186 | BUG_ON(d_inode(dn->d_parent) != dir); |
1187 | BUG_ON(ceph_ino(dir) != | 1187 | BUG_ON(ceph_ino(dir) != |
1188 | le64_to_cpu(rinfo->diri.in->ino)); | 1188 | le64_to_cpu(rinfo->diri.in->ino)); |
1189 | BUG_ON(ceph_snap(dir) != | 1189 | BUG_ON(ceph_snap(dir) != |
@@ -1235,7 +1235,7 @@ retry_lookup: | |||
1235 | /* null dentry? */ | 1235 | /* null dentry? */ |
1236 | if (!rinfo->head->is_target) { | 1236 | if (!rinfo->head->is_target) { |
1237 | dout("fill_trace null dentry\n"); | 1237 | dout("fill_trace null dentry\n"); |
1238 | if (dn->d_inode) { | 1238 | if (d_really_is_positive(dn)) { |
1239 | ceph_dir_clear_ordered(dir); | 1239 | ceph_dir_clear_ordered(dir); |
1240 | dout("d_delete %p\n", dn); | 1240 | dout("d_delete %p\n", dn); |
1241 | d_delete(dn); | 1241 | d_delete(dn); |
@@ -1252,7 +1252,7 @@ retry_lookup: | |||
1252 | } | 1252 | } |
1253 | 1253 | ||
1254 | /* attach proper inode */ | 1254 | /* attach proper inode */ |
1255 | if (!dn->d_inode) { | 1255 | if (d_really_is_negative(dn)) { |
1256 | ceph_dir_clear_ordered(dir); | 1256 | ceph_dir_clear_ordered(dir); |
1257 | ihold(in); | 1257 | ihold(in); |
1258 | dn = splice_dentry(dn, in, &have_lease); | 1258 | dn = splice_dentry(dn, in, &have_lease); |
@@ -1261,9 +1261,9 @@ retry_lookup: | |||
1261 | goto done; | 1261 | goto done; |
1262 | } | 1262 | } |
1263 | req->r_dentry = dn; /* may have spliced */ | 1263 | req->r_dentry = dn; /* may have spliced */ |
1264 | } else if (dn->d_inode && dn->d_inode != in) { | 1264 | } else if (d_really_is_positive(dn) && d_inode(dn) != in) { |
1265 | dout(" %p links to %p %llx.%llx, not %llx.%llx\n", | 1265 | dout(" %p links to %p %llx.%llx, not %llx.%llx\n", |
1266 | dn, dn->d_inode, ceph_vinop(dn->d_inode), | 1266 | dn, d_inode(dn), ceph_vinop(d_inode(dn)), |
1267 | ceph_vinop(in)); | 1267 | ceph_vinop(in)); |
1268 | have_lease = false; | 1268 | have_lease = false; |
1269 | } | 1269 | } |
@@ -1363,7 +1363,7 @@ int ceph_readdir_prepopulate(struct ceph_mds_request *req, | |||
1363 | return readdir_prepopulate_inodes_only(req, session); | 1363 | return readdir_prepopulate_inodes_only(req, session); |
1364 | 1364 | ||
1365 | if (le32_to_cpu(rinfo->head->op) == CEPH_MDS_OP_LSSNAP) { | 1365 | if (le32_to_cpu(rinfo->head->op) == CEPH_MDS_OP_LSSNAP) { |
1366 | snapdir = ceph_get_snapdir(parent->d_inode); | 1366 | snapdir = ceph_get_snapdir(d_inode(parent)); |
1367 | parent = d_find_alias(snapdir); | 1367 | parent = d_find_alias(snapdir); |
1368 | dout("readdir_prepopulate %d items under SNAPDIR dn %p\n", | 1368 | dout("readdir_prepopulate %d items under SNAPDIR dn %p\n", |
1369 | rinfo->dir_nr, parent); | 1369 | rinfo->dir_nr, parent); |
@@ -1371,7 +1371,7 @@ int ceph_readdir_prepopulate(struct ceph_mds_request *req, | |||
1371 | dout("readdir_prepopulate %d items under dn %p\n", | 1371 | dout("readdir_prepopulate %d items under dn %p\n", |
1372 | rinfo->dir_nr, parent); | 1372 | rinfo->dir_nr, parent); |
1373 | if (rinfo->dir_dir) | 1373 | if (rinfo->dir_dir) |
1374 | ceph_fill_dirfrag(parent->d_inode, rinfo->dir_dir); | 1374 | ceph_fill_dirfrag(d_inode(parent), rinfo->dir_dir); |
1375 | } | 1375 | } |
1376 | 1376 | ||
1377 | /* FIXME: release caps/leases if error occurs */ | 1377 | /* FIXME: release caps/leases if error occurs */ |
@@ -1405,11 +1405,11 @@ retry_lookup: | |||
1405 | err = ret; | 1405 | err = ret; |
1406 | goto out; | 1406 | goto out; |
1407 | } | 1407 | } |
1408 | } else if (dn->d_inode && | 1408 | } else if (d_really_is_positive(dn) && |
1409 | (ceph_ino(dn->d_inode) != vino.ino || | 1409 | (ceph_ino(d_inode(dn)) != vino.ino || |
1410 | ceph_snap(dn->d_inode) != vino.snap)) { | 1410 | ceph_snap(d_inode(dn)) != vino.snap)) { |
1411 | dout(" dn %p points to wrong inode %p\n", | 1411 | dout(" dn %p points to wrong inode %p\n", |
1412 | dn, dn->d_inode); | 1412 | dn, d_inode(dn)); |
1413 | d_delete(dn); | 1413 | d_delete(dn); |
1414 | dput(dn); | 1414 | dput(dn); |
1415 | goto retry_lookup; | 1415 | goto retry_lookup; |
@@ -1423,8 +1423,8 @@ retry_lookup: | |||
1423 | } | 1423 | } |
1424 | 1424 | ||
1425 | /* inode */ | 1425 | /* inode */ |
1426 | if (dn->d_inode) { | 1426 | if (d_really_is_positive(dn)) { |
1427 | in = dn->d_inode; | 1427 | in = d_inode(dn); |
1428 | } else { | 1428 | } else { |
1429 | in = ceph_get_inode(parent->d_sb, vino); | 1429 | in = ceph_get_inode(parent->d_sb, vino); |
1430 | if (IS_ERR(in)) { | 1430 | if (IS_ERR(in)) { |
@@ -1440,13 +1440,13 @@ retry_lookup: | |||
1440 | req->r_request_started, -1, | 1440 | req->r_request_started, -1, |
1441 | &req->r_caps_reservation) < 0) { | 1441 | &req->r_caps_reservation) < 0) { |
1442 | pr_err("fill_inode badness on %p\n", in); | 1442 | pr_err("fill_inode badness on %p\n", in); |
1443 | if (!dn->d_inode) | 1443 | if (d_really_is_negative(dn)) |
1444 | iput(in); | 1444 | iput(in); |
1445 | d_drop(dn); | 1445 | d_drop(dn); |
1446 | goto next_item; | 1446 | goto next_item; |
1447 | } | 1447 | } |
1448 | 1448 | ||
1449 | if (!dn->d_inode) { | 1449 | if (d_really_is_negative(dn)) { |
1450 | struct dentry *realdn = splice_dentry(dn, in, NULL); | 1450 | struct dentry *realdn = splice_dentry(dn, in, NULL); |
1451 | if (IS_ERR(realdn)) { | 1451 | if (IS_ERR(realdn)) { |
1452 | err = PTR_ERR(realdn); | 1452 | err = PTR_ERR(realdn); |
@@ -1693,7 +1693,7 @@ retry: | |||
1693 | */ | 1693 | */ |
1694 | static void *ceph_sym_follow_link(struct dentry *dentry, struct nameidata *nd) | 1694 | static void *ceph_sym_follow_link(struct dentry *dentry, struct nameidata *nd) |
1695 | { | 1695 | { |
1696 | struct ceph_inode_info *ci = ceph_inode(dentry->d_inode); | 1696 | struct ceph_inode_info *ci = ceph_inode(d_inode(dentry)); |
1697 | nd_set_link(nd, ci->i_symlink); | 1697 | nd_set_link(nd, ci->i_symlink); |
1698 | return NULL; | 1698 | return NULL; |
1699 | } | 1699 | } |
@@ -1714,7 +1714,7 @@ static const struct inode_operations ceph_symlink_iops = { | |||
1714 | */ | 1714 | */ |
1715 | int ceph_setattr(struct dentry *dentry, struct iattr *attr) | 1715 | int ceph_setattr(struct dentry *dentry, struct iattr *attr) |
1716 | { | 1716 | { |
1717 | struct inode *inode = dentry->d_inode; | 1717 | struct inode *inode = d_inode(dentry); |
1718 | struct ceph_inode_info *ci = ceph_inode(inode); | 1718 | struct ceph_inode_info *ci = ceph_inode(inode); |
1719 | const unsigned int ia_valid = attr->ia_valid; | 1719 | const unsigned int ia_valid = attr->ia_valid; |
1720 | struct ceph_mds_request *req; | 1720 | struct ceph_mds_request *req; |
@@ -1990,7 +1990,7 @@ int ceph_permission(struct inode *inode, int mask) | |||
1990 | int ceph_getattr(struct vfsmount *mnt, struct dentry *dentry, | 1990 | int ceph_getattr(struct vfsmount *mnt, struct dentry *dentry, |
1991 | struct kstat *stat) | 1991 | struct kstat *stat) |
1992 | { | 1992 | { |
1993 | struct inode *inode = dentry->d_inode; | 1993 | struct inode *inode = d_inode(dentry); |
1994 | struct ceph_inode_info *ci = ceph_inode(inode); | 1994 | struct ceph_inode_info *ci = ceph_inode(inode); |
1995 | int err; | 1995 | int err; |
1996 | 1996 | ||
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index 0a2eb32ffe43..84f37f34f9aa 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c | |||
@@ -679,7 +679,7 @@ static struct dentry *get_nonsnap_parent(struct dentry *dentry) | |||
679 | * except to resplice to another snapdir, and either the old or new | 679 | * except to resplice to another snapdir, and either the old or new |
680 | * result is a valid result. | 680 | * result is a valid result. |
681 | */ | 681 | */ |
682 | while (!IS_ROOT(dentry) && ceph_snap(dentry->d_inode) != CEPH_NOSNAP) | 682 | while (!IS_ROOT(dentry) && ceph_snap(d_inode(dentry)) != CEPH_NOSNAP) |
683 | dentry = dentry->d_parent; | 683 | dentry = dentry->d_parent; |
684 | return dentry; | 684 | return dentry; |
685 | } | 685 | } |
@@ -716,20 +716,20 @@ static int __choose_mds(struct ceph_mds_client *mdsc, | |||
716 | } else if (req->r_dentry) { | 716 | } else if (req->r_dentry) { |
717 | /* ignore race with rename; old or new d_parent is okay */ | 717 | /* ignore race with rename; old or new d_parent is okay */ |
718 | struct dentry *parent = req->r_dentry->d_parent; | 718 | struct dentry *parent = req->r_dentry->d_parent; |
719 | struct inode *dir = parent->d_inode; | 719 | struct inode *dir = d_inode(parent); |
720 | 720 | ||
721 | if (dir->i_sb != mdsc->fsc->sb) { | 721 | if (dir->i_sb != mdsc->fsc->sb) { |
722 | /* not this fs! */ | 722 | /* not this fs! */ |
723 | inode = req->r_dentry->d_inode; | 723 | inode = d_inode(req->r_dentry); |
724 | } else if (ceph_snap(dir) != CEPH_NOSNAP) { | 724 | } else if (ceph_snap(dir) != CEPH_NOSNAP) { |
725 | /* direct snapped/virtual snapdir requests | 725 | /* direct snapped/virtual snapdir requests |
726 | * based on parent dir inode */ | 726 | * based on parent dir inode */ |
727 | struct dentry *dn = get_nonsnap_parent(parent); | 727 | struct dentry *dn = get_nonsnap_parent(parent); |
728 | inode = dn->d_inode; | 728 | inode = d_inode(dn); |
729 | dout("__choose_mds using nonsnap parent %p\n", inode); | 729 | dout("__choose_mds using nonsnap parent %p\n", inode); |
730 | } else { | 730 | } else { |
731 | /* dentry target */ | 731 | /* dentry target */ |
732 | inode = req->r_dentry->d_inode; | 732 | inode = d_inode(req->r_dentry); |
733 | if (!inode || mode == USE_AUTH_MDS) { | 733 | if (!inode || mode == USE_AUTH_MDS) { |
734 | /* dir + name */ | 734 | /* dir + name */ |
735 | inode = dir; | 735 | inode = dir; |
@@ -1732,7 +1732,7 @@ retry: | |||
1732 | seq = read_seqbegin(&rename_lock); | 1732 | seq = read_seqbegin(&rename_lock); |
1733 | rcu_read_lock(); | 1733 | rcu_read_lock(); |
1734 | for (temp = dentry; !IS_ROOT(temp);) { | 1734 | for (temp = dentry; !IS_ROOT(temp);) { |
1735 | struct inode *inode = temp->d_inode; | 1735 | struct inode *inode = d_inode(temp); |
1736 | if (inode && ceph_snap(inode) == CEPH_SNAPDIR) | 1736 | if (inode && ceph_snap(inode) == CEPH_SNAPDIR) |
1737 | len++; /* slash only */ | 1737 | len++; /* slash only */ |
1738 | else if (stop_on_nosnap && inode && | 1738 | else if (stop_on_nosnap && inode && |
@@ -1756,7 +1756,7 @@ retry: | |||
1756 | struct inode *inode; | 1756 | struct inode *inode; |
1757 | 1757 | ||
1758 | spin_lock(&temp->d_lock); | 1758 | spin_lock(&temp->d_lock); |
1759 | inode = temp->d_inode; | 1759 | inode = d_inode(temp); |
1760 | if (inode && ceph_snap(inode) == CEPH_SNAPDIR) { | 1760 | if (inode && ceph_snap(inode) == CEPH_SNAPDIR) { |
1761 | dout("build_path path+%d: %p SNAPDIR\n", | 1761 | dout("build_path path+%d: %p SNAPDIR\n", |
1762 | pos, temp); | 1762 | pos, temp); |
@@ -1790,7 +1790,7 @@ retry: | |||
1790 | goto retry; | 1790 | goto retry; |
1791 | } | 1791 | } |
1792 | 1792 | ||
1793 | *base = ceph_ino(temp->d_inode); | 1793 | *base = ceph_ino(d_inode(temp)); |
1794 | *plen = len; | 1794 | *plen = len; |
1795 | dout("build_path on %p %d built %llx '%.*s'\n", | 1795 | dout("build_path on %p %d built %llx '%.*s'\n", |
1796 | dentry, d_count(dentry), *base, len, path); | 1796 | dentry, d_count(dentry), *base, len, path); |
@@ -1803,8 +1803,8 @@ static int build_dentry_path(struct dentry *dentry, | |||
1803 | { | 1803 | { |
1804 | char *path; | 1804 | char *path; |
1805 | 1805 | ||
1806 | if (ceph_snap(dentry->d_parent->d_inode) == CEPH_NOSNAP) { | 1806 | if (ceph_snap(d_inode(dentry->d_parent)) == CEPH_NOSNAP) { |
1807 | *pino = ceph_ino(dentry->d_parent->d_inode); | 1807 | *pino = ceph_ino(d_inode(dentry->d_parent)); |
1808 | *ppath = dentry->d_name.name; | 1808 | *ppath = dentry->d_name.name; |
1809 | *ppathlen = dentry->d_name.len; | 1809 | *ppathlen = dentry->d_name.len; |
1810 | return 0; | 1810 | return 0; |
@@ -1945,7 +1945,7 @@ static struct ceph_msg *create_request_message(struct ceph_mds_client *mdsc, | |||
1945 | releases = 0; | 1945 | releases = 0; |
1946 | if (req->r_inode_drop) | 1946 | if (req->r_inode_drop) |
1947 | releases += ceph_encode_inode_release(&p, | 1947 | releases += ceph_encode_inode_release(&p, |
1948 | req->r_inode ? req->r_inode : req->r_dentry->d_inode, | 1948 | req->r_inode ? req->r_inode : d_inode(req->r_dentry), |
1949 | mds, req->r_inode_drop, req->r_inode_unless, 0); | 1949 | mds, req->r_inode_drop, req->r_inode_unless, 0); |
1950 | if (req->r_dentry_drop) | 1950 | if (req->r_dentry_drop) |
1951 | releases += ceph_encode_dentry_release(&p, req->r_dentry, | 1951 | releases += ceph_encode_dentry_release(&p, req->r_dentry, |
@@ -1955,7 +1955,7 @@ static struct ceph_msg *create_request_message(struct ceph_mds_client *mdsc, | |||
1955 | mds, req->r_old_dentry_drop, req->r_old_dentry_unless); | 1955 | mds, req->r_old_dentry_drop, req->r_old_dentry_unless); |
1956 | if (req->r_old_inode_drop) | 1956 | if (req->r_old_inode_drop) |
1957 | releases += ceph_encode_inode_release(&p, | 1957 | releases += ceph_encode_inode_release(&p, |
1958 | req->r_old_dentry->d_inode, | 1958 | d_inode(req->r_old_dentry), |
1959 | mds, req->r_old_inode_drop, req->r_old_inode_unless, 0); | 1959 | mds, req->r_old_inode_drop, req->r_old_inode_unless, 0); |
1960 | 1960 | ||
1961 | if (drop_cap_releases) { | 1961 | if (drop_cap_releases) { |
diff --git a/fs/ceph/super.c b/fs/ceph/super.c index e463ebd69a9c..4e9905374078 100644 --- a/fs/ceph/super.c +++ b/fs/ceph/super.c | |||
@@ -44,7 +44,7 @@ static void ceph_put_super(struct super_block *s) | |||
44 | 44 | ||
45 | static int ceph_statfs(struct dentry *dentry, struct kstatfs *buf) | 45 | static int ceph_statfs(struct dentry *dentry, struct kstatfs *buf) |
46 | { | 46 | { |
47 | struct ceph_fs_client *fsc = ceph_inode_to_client(dentry->d_inode); | 47 | struct ceph_fs_client *fsc = ceph_inode_to_client(d_inode(dentry)); |
48 | struct ceph_monmap *monmap = fsc->client->monc.monmap; | 48 | struct ceph_monmap *monmap = fsc->client->monc.monmap; |
49 | struct ceph_statfs st; | 49 | struct ceph_statfs st; |
50 | u64 fsid; | 50 | u64 fsid; |
@@ -972,7 +972,7 @@ static struct dentry *ceph_mount(struct file_system_type *fs_type, | |||
972 | if (IS_ERR(res)) | 972 | if (IS_ERR(res)) |
973 | goto out_splat; | 973 | goto out_splat; |
974 | dout("root %p inode %p ino %llx.%llx\n", res, | 974 | dout("root %p inode %p ino %llx.%llx\n", res, |
975 | res->d_inode, ceph_vinop(res->d_inode)); | 975 | d_inode(res), ceph_vinop(d_inode(res))); |
976 | return res; | 976 | return res; |
977 | 977 | ||
978 | out_splat: | 978 | out_splat: |
diff --git a/fs/ceph/xattr.c b/fs/ceph/xattr.c index 5c4c9c256931..cd7ffad4041d 100644 --- a/fs/ceph/xattr.c +++ b/fs/ceph/xattr.c | |||
@@ -776,12 +776,12 @@ ssize_t ceph_getxattr(struct dentry *dentry, const char *name, void *value, | |||
776 | if (!strncmp(name, XATTR_SYSTEM_PREFIX, XATTR_SYSTEM_PREFIX_LEN)) | 776 | if (!strncmp(name, XATTR_SYSTEM_PREFIX, XATTR_SYSTEM_PREFIX_LEN)) |
777 | return generic_getxattr(dentry, name, value, size); | 777 | return generic_getxattr(dentry, name, value, size); |
778 | 778 | ||
779 | return __ceph_getxattr(dentry->d_inode, name, value, size); | 779 | return __ceph_getxattr(d_inode(dentry), name, value, size); |
780 | } | 780 | } |
781 | 781 | ||
782 | ssize_t ceph_listxattr(struct dentry *dentry, char *names, size_t size) | 782 | ssize_t ceph_listxattr(struct dentry *dentry, char *names, size_t size) |
783 | { | 783 | { |
784 | struct inode *inode = dentry->d_inode; | 784 | struct inode *inode = d_inode(dentry); |
785 | struct ceph_inode_info *ci = ceph_inode(inode); | 785 | struct ceph_inode_info *ci = ceph_inode(inode); |
786 | struct ceph_vxattr *vxattrs = ceph_inode_vxattrs(inode); | 786 | struct ceph_vxattr *vxattrs = ceph_inode_vxattrs(inode); |
787 | u32 vir_namelen = 0; | 787 | u32 vir_namelen = 0; |
@@ -847,7 +847,7 @@ static int ceph_sync_setxattr(struct dentry *dentry, const char *name, | |||
847 | const char *value, size_t size, int flags) | 847 | const char *value, size_t size, int flags) |
848 | { | 848 | { |
849 | struct ceph_fs_client *fsc = ceph_sb_to_client(dentry->d_sb); | 849 | struct ceph_fs_client *fsc = ceph_sb_to_client(dentry->d_sb); |
850 | struct inode *inode = dentry->d_inode; | 850 | struct inode *inode = d_inode(dentry); |
851 | struct ceph_inode_info *ci = ceph_inode(inode); | 851 | struct ceph_inode_info *ci = ceph_inode(inode); |
852 | struct ceph_mds_request *req; | 852 | struct ceph_mds_request *req; |
853 | struct ceph_mds_client *mdsc = fsc->mdsc; | 853 | struct ceph_mds_client *mdsc = fsc->mdsc; |
@@ -908,7 +908,7 @@ out: | |||
908 | int __ceph_setxattr(struct dentry *dentry, const char *name, | 908 | int __ceph_setxattr(struct dentry *dentry, const char *name, |
909 | const void *value, size_t size, int flags) | 909 | const void *value, size_t size, int flags) |
910 | { | 910 | { |
911 | struct inode *inode = dentry->d_inode; | 911 | struct inode *inode = d_inode(dentry); |
912 | struct ceph_vxattr *vxattr; | 912 | struct ceph_vxattr *vxattr; |
913 | struct ceph_inode_info *ci = ceph_inode(inode); | 913 | struct ceph_inode_info *ci = ceph_inode(inode); |
914 | int issued; | 914 | int issued; |
@@ -1002,7 +1002,7 @@ out: | |||
1002 | int ceph_setxattr(struct dentry *dentry, const char *name, | 1002 | int ceph_setxattr(struct dentry *dentry, const char *name, |
1003 | const void *value, size_t size, int flags) | 1003 | const void *value, size_t size, int flags) |
1004 | { | 1004 | { |
1005 | if (ceph_snap(dentry->d_inode) != CEPH_NOSNAP) | 1005 | if (ceph_snap(d_inode(dentry)) != CEPH_NOSNAP) |
1006 | return -EROFS; | 1006 | return -EROFS; |
1007 | 1007 | ||
1008 | if (!strncmp(name, XATTR_SYSTEM_PREFIX, XATTR_SYSTEM_PREFIX_LEN)) | 1008 | if (!strncmp(name, XATTR_SYSTEM_PREFIX, XATTR_SYSTEM_PREFIX_LEN)) |
@@ -1018,7 +1018,7 @@ static int ceph_send_removexattr(struct dentry *dentry, const char *name) | |||
1018 | { | 1018 | { |
1019 | struct ceph_fs_client *fsc = ceph_sb_to_client(dentry->d_sb); | 1019 | struct ceph_fs_client *fsc = ceph_sb_to_client(dentry->d_sb); |
1020 | struct ceph_mds_client *mdsc = fsc->mdsc; | 1020 | struct ceph_mds_client *mdsc = fsc->mdsc; |
1021 | struct inode *inode = dentry->d_inode; | 1021 | struct inode *inode = d_inode(dentry); |
1022 | struct ceph_mds_request *req; | 1022 | struct ceph_mds_request *req; |
1023 | int err; | 1023 | int err; |
1024 | 1024 | ||
@@ -1041,7 +1041,7 @@ static int ceph_send_removexattr(struct dentry *dentry, const char *name) | |||
1041 | 1041 | ||
1042 | int __ceph_removexattr(struct dentry *dentry, const char *name) | 1042 | int __ceph_removexattr(struct dentry *dentry, const char *name) |
1043 | { | 1043 | { |
1044 | struct inode *inode = dentry->d_inode; | 1044 | struct inode *inode = d_inode(dentry); |
1045 | struct ceph_vxattr *vxattr; | 1045 | struct ceph_vxattr *vxattr; |
1046 | struct ceph_inode_info *ci = ceph_inode(inode); | 1046 | struct ceph_inode_info *ci = ceph_inode(inode); |
1047 | int issued; | 1047 | int issued; |
@@ -1107,7 +1107,7 @@ out: | |||
1107 | 1107 | ||
1108 | int ceph_removexattr(struct dentry *dentry, const char *name) | 1108 | int ceph_removexattr(struct dentry *dentry, const char *name) |
1109 | { | 1109 | { |
1110 | if (ceph_snap(dentry->d_inode) != CEPH_NOSNAP) | 1110 | if (ceph_snap(d_inode(dentry)) != CEPH_NOSNAP) |
1111 | return -EROFS; | 1111 | return -EROFS; |
1112 | 1112 | ||
1113 | if (!strncmp(name, XATTR_SYSTEM_PREFIX, XATTR_SYSTEM_PREFIX_LEN)) | 1113 | if (!strncmp(name, XATTR_SYSTEM_PREFIX, XATTR_SYSTEM_PREFIX_LEN)) |