diff options
author | David Howells <dhowells@redhat.com> | 2015-03-17 18:25:59 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-04-15 15:06:57 -0400 |
commit | 2b0143b5c986be1ce8408b3aadc4709e0a94429d (patch) | |
tree | 98b1dee70f3d5d9ac9309f4638e41864ddcd0952 /fs/ceph | |
parent | ce0b16ddf18df35026164fda4a642ef10c01f442 (diff) |
VFS: normal filesystems (and lustre): d_inode() annotations
that's the bulk of filesystem drivers dealing with inodes of their own
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
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 8172775428a0..283cf69c6904 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c | |||
@@ -3391,7 +3391,7 @@ int ceph_encode_inode_release(void **p, struct inode *inode, | |||
3391 | int ceph_encode_dentry_release(void **p, struct dentry *dentry, | 3391 | int ceph_encode_dentry_release(void **p, struct dentry *dentry, |
3392 | int mds, int drop, int unless) | 3392 | int mds, int drop, int unless) |
3393 | { | 3393 | { |
3394 | struct inode *dir = dentry->d_parent->d_inode; | 3394 | struct inode *dir = d_inode(dentry->d_parent); |
3395 | struct ceph_mds_request_release *rel = *p; | 3395 | struct ceph_mds_request_release *rel = *p; |
3396 | struct ceph_dentry_info *di = ceph_dentry(dentry); | 3396 | struct ceph_dentry_info *di = ceph_dentry(dentry); |
3397 | int force = 0; | 3397 | 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 83e9976f7189..173fc598c7f1 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; |
@@ -535,7 +535,7 @@ int ceph_handle_snapdir(struct ceph_mds_request *req, | |||
535 | struct dentry *dentry, int err) | 535 | struct dentry *dentry, int err) |
536 | { | 536 | { |
537 | struct ceph_fs_client *fsc = ceph_sb_to_client(dentry->d_sb); | 537 | struct ceph_fs_client *fsc = ceph_sb_to_client(dentry->d_sb); |
538 | struct inode *parent = dentry->d_parent->d_inode; /* we hold i_mutex */ | 538 | struct inode *parent = d_inode(dentry->d_parent); /* we hold i_mutex */ |
539 | 539 | ||
540 | /* .snap dir? */ | 540 | /* .snap dir? */ |
541 | if (err == -ENOENT && | 541 | if (err == -ENOENT && |
@@ -571,8 +571,8 @@ struct dentry *ceph_finish_lookup(struct ceph_mds_request *req, | |||
571 | err = 0; | 571 | err = 0; |
572 | if (!req->r_reply_info.head->is_dentry) { | 572 | if (!req->r_reply_info.head->is_dentry) { |
573 | dout("ENOENT and no trace, dentry %p inode %p\n", | 573 | dout("ENOENT and no trace, dentry %p inode %p\n", |
574 | dentry, dentry->d_inode); | 574 | dentry, d_inode(dentry)); |
575 | if (dentry->d_inode) { | 575 | if (d_really_is_positive(dentry)) { |
576 | d_drop(dentry); | 576 | d_drop(dentry); |
577 | err = -ENOENT; | 577 | err = -ENOENT; |
578 | } else { | 578 | } else { |
@@ -619,7 +619,7 @@ static struct dentry *ceph_lookup(struct inode *dir, struct dentry *dentry, | |||
619 | return ERR_PTR(err); | 619 | return ERR_PTR(err); |
620 | 620 | ||
621 | /* can we conclude ENOENT locally? */ | 621 | /* can we conclude ENOENT locally? */ |
622 | if (dentry->d_inode == NULL) { | 622 | if (d_really_is_negative(dentry)) { |
623 | struct ceph_inode_info *ci = ceph_inode(dir); | 623 | struct ceph_inode_info *ci = ceph_inode(dir); |
624 | struct ceph_dentry_info *di = ceph_dentry(dentry); | 624 | struct ceph_dentry_info *di = ceph_dentry(dentry); |
625 | 625 | ||
@@ -725,7 +725,7 @@ static int ceph_mknod(struct inode *dir, struct dentry *dentry, | |||
725 | ceph_mdsc_put_request(req); | 725 | ceph_mdsc_put_request(req); |
726 | out: | 726 | out: |
727 | if (!err) | 727 | if (!err) |
728 | ceph_init_inode_acls(dentry->d_inode, &acls); | 728 | ceph_init_inode_acls(d_inode(dentry), &acls); |
729 | else | 729 | else |
730 | d_drop(dentry); | 730 | d_drop(dentry); |
731 | ceph_release_acls_info(&acls); | 731 | ceph_release_acls_info(&acls); |
@@ -821,7 +821,7 @@ static int ceph_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) | |||
821 | ceph_mdsc_put_request(req); | 821 | ceph_mdsc_put_request(req); |
822 | out: | 822 | out: |
823 | if (!err) | 823 | if (!err) |
824 | ceph_init_inode_acls(dentry->d_inode, &acls); | 824 | ceph_init_inode_acls(d_inode(dentry), &acls); |
825 | else | 825 | else |
826 | d_drop(dentry); | 826 | d_drop(dentry); |
827 | ceph_release_acls_info(&acls); | 827 | ceph_release_acls_info(&acls); |
@@ -858,8 +858,8 @@ static int ceph_link(struct dentry *old_dentry, struct inode *dir, | |||
858 | if (err) { | 858 | if (err) { |
859 | d_drop(dentry); | 859 | d_drop(dentry); |
860 | } else if (!req->r_reply_info.head->is_dentry) { | 860 | } else if (!req->r_reply_info.head->is_dentry) { |
861 | ihold(old_dentry->d_inode); | 861 | ihold(d_inode(old_dentry)); |
862 | d_instantiate(dentry, old_dentry->d_inode); | 862 | d_instantiate(dentry, d_inode(old_dentry)); |
863 | } | 863 | } |
864 | ceph_mdsc_put_request(req); | 864 | ceph_mdsc_put_request(req); |
865 | return err; | 865 | return err; |
@@ -892,7 +892,7 @@ static int ceph_unlink(struct inode *dir, struct dentry *dentry) | |||
892 | { | 892 | { |
893 | struct ceph_fs_client *fsc = ceph_sb_to_client(dir->i_sb); | 893 | struct ceph_fs_client *fsc = ceph_sb_to_client(dir->i_sb); |
894 | struct ceph_mds_client *mdsc = fsc->mdsc; | 894 | struct ceph_mds_client *mdsc = fsc->mdsc; |
895 | struct inode *inode = dentry->d_inode; | 895 | struct inode *inode = d_inode(dentry); |
896 | struct ceph_mds_request *req; | 896 | struct ceph_mds_request *req; |
897 | int err = -EROFS; | 897 | int err = -EROFS; |
898 | int op; | 898 | int op; |
@@ -957,8 +957,8 @@ static int ceph_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
957 | req->r_dentry_unless = CEPH_CAP_FILE_EXCL; | 957 | req->r_dentry_unless = CEPH_CAP_FILE_EXCL; |
958 | /* release LINK_RDCACHE on source inode (mds will lock it) */ | 958 | /* release LINK_RDCACHE on source inode (mds will lock it) */ |
959 | req->r_old_inode_drop = CEPH_CAP_LINK_SHARED; | 959 | req->r_old_inode_drop = CEPH_CAP_LINK_SHARED; |
960 | if (new_dentry->d_inode) | 960 | if (d_really_is_positive(new_dentry)) |
961 | req->r_inode_drop = drop_caps_for_unlink(new_dentry->d_inode); | 961 | req->r_inode_drop = drop_caps_for_unlink(d_inode(new_dentry)); |
962 | err = ceph_mdsc_do_request(mdsc, old_dir, req); | 962 | err = ceph_mdsc_do_request(mdsc, old_dir, req); |
963 | if (!err && !req->r_reply_info.head->is_dentry) { | 963 | if (!err && !req->r_reply_info.head->is_dentry) { |
964 | /* | 964 | /* |
@@ -1024,7 +1024,7 @@ static int dentry_lease_is_valid(struct dentry *dentry) | |||
1024 | if (di->lease_renew_after && | 1024 | if (di->lease_renew_after && |
1025 | time_after(jiffies, di->lease_renew_after)) { | 1025 | time_after(jiffies, di->lease_renew_after)) { |
1026 | /* we should renew */ | 1026 | /* we should renew */ |
1027 | dir = dentry->d_parent->d_inode; | 1027 | dir = d_inode(dentry->d_parent); |
1028 | session = ceph_get_mds_session(s); | 1028 | session = ceph_get_mds_session(s); |
1029 | seq = di->lease_seq; | 1029 | seq = di->lease_seq; |
1030 | di->lease_renew_after = 0; | 1030 | di->lease_renew_after = 0; |
@@ -1074,22 +1074,22 @@ static int ceph_d_revalidate(struct dentry *dentry, unsigned int flags) | |||
1074 | return -ECHILD; | 1074 | return -ECHILD; |
1075 | 1075 | ||
1076 | dout("d_revalidate %p '%pd' inode %p offset %lld\n", dentry, | 1076 | dout("d_revalidate %p '%pd' inode %p offset %lld\n", dentry, |
1077 | dentry, dentry->d_inode, ceph_dentry(dentry)->offset); | 1077 | dentry, d_inode(dentry), ceph_dentry(dentry)->offset); |
1078 | 1078 | ||
1079 | dir = ceph_get_dentry_parent_inode(dentry); | 1079 | dir = ceph_get_dentry_parent_inode(dentry); |
1080 | 1080 | ||
1081 | /* always trust cached snapped dentries, snapdir dentry */ | 1081 | /* always trust cached snapped dentries, snapdir dentry */ |
1082 | if (ceph_snap(dir) != CEPH_NOSNAP) { | 1082 | if (ceph_snap(dir) != CEPH_NOSNAP) { |
1083 | dout("d_revalidate %p '%pd' inode %p is SNAPPED\n", dentry, | 1083 | dout("d_revalidate %p '%pd' inode %p is SNAPPED\n", dentry, |
1084 | dentry, dentry->d_inode); | 1084 | dentry, d_inode(dentry)); |
1085 | valid = 1; | 1085 | valid = 1; |
1086 | } else if (dentry->d_inode && | 1086 | } else if (d_really_is_positive(dentry) && |
1087 | ceph_snap(dentry->d_inode) == CEPH_SNAPDIR) { | 1087 | ceph_snap(d_inode(dentry)) == CEPH_SNAPDIR) { |
1088 | valid = 1; | 1088 | valid = 1; |
1089 | } else if (dentry_lease_is_valid(dentry) || | 1089 | } else if (dentry_lease_is_valid(dentry) || |
1090 | dir_lease_is_valid(dir, dentry)) { | 1090 | dir_lease_is_valid(dir, dentry)) { |
1091 | if (dentry->d_inode) | 1091 | if (d_really_is_positive(dentry)) |
1092 | valid = ceph_is_any_caps(dentry->d_inode); | 1092 | valid = ceph_is_any_caps(d_inode(dentry)); |
1093 | else | 1093 | else |
1094 | valid = 1; | 1094 | valid = 1; |
1095 | } | 1095 | } |
@@ -1151,7 +1151,7 @@ static void ceph_d_prune(struct dentry *dentry) | |||
1151 | * we hold d_lock, so d_parent is stable, and d_fsdata is never | 1151 | * we hold d_lock, so d_parent is stable, and d_fsdata is never |
1152 | * cleared until d_release | 1152 | * cleared until d_release |
1153 | */ | 1153 | */ |
1154 | ceph_dir_clear_complete(dentry->d_parent->d_inode); | 1154 | ceph_dir_clear_complete(d_inode(dentry->d_parent)); |
1155 | } | 1155 | } |
1156 | 1156 | ||
1157 | /* | 1157 | /* |
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 71c073f38e54..a39389092102 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; |
@@ -1712,7 +1712,7 @@ retry: | |||
1712 | seq = read_seqbegin(&rename_lock); | 1712 | seq = read_seqbegin(&rename_lock); |
1713 | rcu_read_lock(); | 1713 | rcu_read_lock(); |
1714 | for (temp = dentry; !IS_ROOT(temp);) { | 1714 | for (temp = dentry; !IS_ROOT(temp);) { |
1715 | struct inode *inode = temp->d_inode; | 1715 | struct inode *inode = d_inode(temp); |
1716 | if (inode && ceph_snap(inode) == CEPH_SNAPDIR) | 1716 | if (inode && ceph_snap(inode) == CEPH_SNAPDIR) |
1717 | len++; /* slash only */ | 1717 | len++; /* slash only */ |
1718 | else if (stop_on_nosnap && inode && | 1718 | else if (stop_on_nosnap && inode && |
@@ -1736,7 +1736,7 @@ retry: | |||
1736 | struct inode *inode; | 1736 | struct inode *inode; |
1737 | 1737 | ||
1738 | spin_lock(&temp->d_lock); | 1738 | spin_lock(&temp->d_lock); |
1739 | inode = temp->d_inode; | 1739 | inode = d_inode(temp); |
1740 | if (inode && ceph_snap(inode) == CEPH_SNAPDIR) { | 1740 | if (inode && ceph_snap(inode) == CEPH_SNAPDIR) { |
1741 | dout("build_path path+%d: %p SNAPDIR\n", | 1741 | dout("build_path path+%d: %p SNAPDIR\n", |
1742 | pos, temp); | 1742 | pos, temp); |
@@ -1770,7 +1770,7 @@ retry: | |||
1770 | goto retry; | 1770 | goto retry; |
1771 | } | 1771 | } |
1772 | 1772 | ||
1773 | *base = ceph_ino(temp->d_inode); | 1773 | *base = ceph_ino(d_inode(temp)); |
1774 | *plen = len; | 1774 | *plen = len; |
1775 | dout("build_path on %p %d built %llx '%.*s'\n", | 1775 | dout("build_path on %p %d built %llx '%.*s'\n", |
1776 | dentry, d_count(dentry), *base, len, path); | 1776 | dentry, d_count(dentry), *base, len, path); |
@@ -1783,8 +1783,8 @@ static int build_dentry_path(struct dentry *dentry, | |||
1783 | { | 1783 | { |
1784 | char *path; | 1784 | char *path; |
1785 | 1785 | ||
1786 | if (ceph_snap(dentry->d_parent->d_inode) == CEPH_NOSNAP) { | 1786 | if (ceph_snap(d_inode(dentry->d_parent)) == CEPH_NOSNAP) { |
1787 | *pino = ceph_ino(dentry->d_parent->d_inode); | 1787 | *pino = ceph_ino(d_inode(dentry->d_parent)); |
1788 | *ppath = dentry->d_name.name; | 1788 | *ppath = dentry->d_name.name; |
1789 | *ppathlen = dentry->d_name.len; | 1789 | *ppathlen = dentry->d_name.len; |
1790 | return 0; | 1790 | return 0; |
@@ -1925,7 +1925,7 @@ static struct ceph_msg *create_request_message(struct ceph_mds_client *mdsc, | |||
1925 | releases = 0; | 1925 | releases = 0; |
1926 | if (req->r_inode_drop) | 1926 | if (req->r_inode_drop) |
1927 | releases += ceph_encode_inode_release(&p, | 1927 | releases += ceph_encode_inode_release(&p, |
1928 | req->r_inode ? req->r_inode : req->r_dentry->d_inode, | 1928 | req->r_inode ? req->r_inode : d_inode(req->r_dentry), |
1929 | mds, req->r_inode_drop, req->r_inode_unless, 0); | 1929 | mds, req->r_inode_drop, req->r_inode_unless, 0); |
1930 | if (req->r_dentry_drop) | 1930 | if (req->r_dentry_drop) |
1931 | releases += ceph_encode_dentry_release(&p, req->r_dentry, | 1931 | releases += ceph_encode_dentry_release(&p, req->r_dentry, |
@@ -1935,7 +1935,7 @@ static struct ceph_msg *create_request_message(struct ceph_mds_client *mdsc, | |||
1935 | mds, req->r_old_dentry_drop, req->r_old_dentry_unless); | 1935 | mds, req->r_old_dentry_drop, req->r_old_dentry_unless); |
1936 | if (req->r_old_inode_drop) | 1936 | if (req->r_old_inode_drop) |
1937 | releases += ceph_encode_inode_release(&p, | 1937 | releases += ceph_encode_inode_release(&p, |
1938 | req->r_old_dentry->d_inode, | 1938 | d_inode(req->r_old_dentry), |
1939 | mds, req->r_old_inode_drop, req->r_old_inode_unless, 0); | 1939 | mds, req->r_old_inode_drop, req->r_old_inode_unless, 0); |
1940 | head->num_releases = cpu_to_le16(releases); | 1940 | head->num_releases = cpu_to_le16(releases); |
1941 | 1941 | ||
diff --git a/fs/ceph/super.c b/fs/ceph/super.c index a63997b8bcff..e68591df9942 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; |
@@ -976,7 +976,7 @@ static struct dentry *ceph_mount(struct file_system_type *fs_type, | |||
976 | if (IS_ERR(res)) | 976 | if (IS_ERR(res)) |
977 | goto out_splat; | 977 | goto out_splat; |
978 | dout("root %p inode %p ino %llx.%llx\n", res, | 978 | dout("root %p inode %p ino %llx.%llx\n", res, |
979 | res->d_inode, ceph_vinop(res->d_inode)); | 979 | d_inode(res), ceph_vinop(d_inode(res))); |
980 | return res; | 980 | return res; |
981 | 981 | ||
982 | out_splat: | 982 | out_splat: |
diff --git a/fs/ceph/xattr.c b/fs/ceph/xattr.c index 5a492caf34cb..e448766ce549 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; |
@@ -901,7 +901,7 @@ out: | |||
901 | int __ceph_setxattr(struct dentry *dentry, const char *name, | 901 | int __ceph_setxattr(struct dentry *dentry, const char *name, |
902 | const void *value, size_t size, int flags) | 902 | const void *value, size_t size, int flags) |
903 | { | 903 | { |
904 | struct inode *inode = dentry->d_inode; | 904 | struct inode *inode = d_inode(dentry); |
905 | struct ceph_vxattr *vxattr; | 905 | struct ceph_vxattr *vxattr; |
906 | struct ceph_inode_info *ci = ceph_inode(inode); | 906 | struct ceph_inode_info *ci = ceph_inode(inode); |
907 | int issued; | 907 | int issued; |
@@ -995,7 +995,7 @@ out: | |||
995 | int ceph_setxattr(struct dentry *dentry, const char *name, | 995 | int ceph_setxattr(struct dentry *dentry, const char *name, |
996 | const void *value, size_t size, int flags) | 996 | const void *value, size_t size, int flags) |
997 | { | 997 | { |
998 | if (ceph_snap(dentry->d_inode) != CEPH_NOSNAP) | 998 | if (ceph_snap(d_inode(dentry)) != CEPH_NOSNAP) |
999 | return -EROFS; | 999 | return -EROFS; |
1000 | 1000 | ||
1001 | if (!strncmp(name, XATTR_SYSTEM_PREFIX, XATTR_SYSTEM_PREFIX_LEN)) | 1001 | if (!strncmp(name, XATTR_SYSTEM_PREFIX, XATTR_SYSTEM_PREFIX_LEN)) |
@@ -1011,7 +1011,7 @@ static int ceph_send_removexattr(struct dentry *dentry, const char *name) | |||
1011 | { | 1011 | { |
1012 | struct ceph_fs_client *fsc = ceph_sb_to_client(dentry->d_sb); | 1012 | struct ceph_fs_client *fsc = ceph_sb_to_client(dentry->d_sb); |
1013 | struct ceph_mds_client *mdsc = fsc->mdsc; | 1013 | struct ceph_mds_client *mdsc = fsc->mdsc; |
1014 | struct inode *inode = dentry->d_inode; | 1014 | struct inode *inode = d_inode(dentry); |
1015 | struct ceph_mds_request *req; | 1015 | struct ceph_mds_request *req; |
1016 | int err; | 1016 | int err; |
1017 | 1017 | ||
@@ -1032,7 +1032,7 @@ static int ceph_send_removexattr(struct dentry *dentry, const char *name) | |||
1032 | 1032 | ||
1033 | int __ceph_removexattr(struct dentry *dentry, const char *name) | 1033 | int __ceph_removexattr(struct dentry *dentry, const char *name) |
1034 | { | 1034 | { |
1035 | struct inode *inode = dentry->d_inode; | 1035 | struct inode *inode = d_inode(dentry); |
1036 | struct ceph_vxattr *vxattr; | 1036 | struct ceph_vxattr *vxattr; |
1037 | struct ceph_inode_info *ci = ceph_inode(inode); | 1037 | struct ceph_inode_info *ci = ceph_inode(inode); |
1038 | int issued; | 1038 | int issued; |
@@ -1098,7 +1098,7 @@ out: | |||
1098 | 1098 | ||
1099 | int ceph_removexattr(struct dentry *dentry, const char *name) | 1099 | int ceph_removexattr(struct dentry *dentry, const char *name) |
1100 | { | 1100 | { |
1101 | if (ceph_snap(dentry->d_inode) != CEPH_NOSNAP) | 1101 | if (ceph_snap(d_inode(dentry)) != CEPH_NOSNAP) |
1102 | return -EROFS; | 1102 | return -EROFS; |
1103 | 1103 | ||
1104 | if (!strncmp(name, XATTR_SYSTEM_PREFIX, XATTR_SYSTEM_PREFIX_LEN)) | 1104 | if (!strncmp(name, XATTR_SYSTEM_PREFIX, XATTR_SYSTEM_PREFIX_LEN)) |