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/coda | |
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/coda')
-rw-r--r-- | fs/coda/cache.c | 4 | ||||
-rw-r--r-- | fs/coda/dir.c | 22 | ||||
-rw-r--r-- | fs/coda/inode.c | 6 | ||||
-rw-r--r-- | fs/coda/pioctl.c | 2 | ||||
-rw-r--r-- | fs/coda/upcall.c | 4 |
5 files changed, 19 insertions, 19 deletions
diff --git a/fs/coda/cache.c b/fs/coda/cache.c index 46ee6f238985..5bb630a769e0 100644 --- a/fs/coda/cache.c +++ b/fs/coda/cache.c | |||
@@ -94,8 +94,8 @@ static void coda_flag_children(struct dentry *parent, int flag) | |||
94 | spin_lock(&parent->d_lock); | 94 | spin_lock(&parent->d_lock); |
95 | list_for_each_entry(de, &parent->d_subdirs, d_child) { | 95 | list_for_each_entry(de, &parent->d_subdirs, d_child) { |
96 | /* don't know what to do with negative dentries */ | 96 | /* don't know what to do with negative dentries */ |
97 | if (de->d_inode ) | 97 | if (d_inode(de) ) |
98 | coda_flag_inode(de->d_inode, flag); | 98 | coda_flag_inode(d_inode(de), flag); |
99 | } | 99 | } |
100 | spin_unlock(&parent->d_lock); | 100 | spin_unlock(&parent->d_lock); |
101 | return; | 101 | return; |
diff --git a/fs/coda/dir.c b/fs/coda/dir.c index 60cb88c1dd2b..fda9f4311212 100644 --- a/fs/coda/dir.c +++ b/fs/coda/dir.c | |||
@@ -201,7 +201,7 @@ err_out: | |||
201 | static int coda_link(struct dentry *source_de, struct inode *dir_inode, | 201 | static int coda_link(struct dentry *source_de, struct inode *dir_inode, |
202 | struct dentry *de) | 202 | struct dentry *de) |
203 | { | 203 | { |
204 | struct inode *inode = source_de->d_inode; | 204 | struct inode *inode = d_inode(source_de); |
205 | const char * name = de->d_name.name; | 205 | const char * name = de->d_name.name; |
206 | int len = de->d_name.len; | 206 | int len = de->d_name.len; |
207 | int error; | 207 | int error; |
@@ -266,7 +266,7 @@ static int coda_unlink(struct inode *dir, struct dentry *de) | |||
266 | return error; | 266 | return error; |
267 | 267 | ||
268 | coda_dir_update_mtime(dir); | 268 | coda_dir_update_mtime(dir); |
269 | drop_nlink(de->d_inode); | 269 | drop_nlink(d_inode(de)); |
270 | return 0; | 270 | return 0; |
271 | } | 271 | } |
272 | 272 | ||
@@ -279,8 +279,8 @@ static int coda_rmdir(struct inode *dir, struct dentry *de) | |||
279 | error = venus_rmdir(dir->i_sb, coda_i2f(dir), name, len); | 279 | error = venus_rmdir(dir->i_sb, coda_i2f(dir), name, len); |
280 | if (!error) { | 280 | if (!error) { |
281 | /* VFS may delete the child */ | 281 | /* VFS may delete the child */ |
282 | if (de->d_inode) | 282 | if (d_really_is_positive(de)) |
283 | clear_nlink(de->d_inode); | 283 | clear_nlink(d_inode(de)); |
284 | 284 | ||
285 | /* fix the link count of the parent */ | 285 | /* fix the link count of the parent */ |
286 | coda_dir_drop_nlink(dir); | 286 | coda_dir_drop_nlink(dir); |
@@ -303,14 +303,14 @@ static int coda_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
303 | coda_i2f(new_dir), old_length, new_length, | 303 | coda_i2f(new_dir), old_length, new_length, |
304 | (const char *) old_name, (const char *)new_name); | 304 | (const char *) old_name, (const char *)new_name); |
305 | if (!error) { | 305 | if (!error) { |
306 | if (new_dentry->d_inode) { | 306 | if (d_really_is_positive(new_dentry)) { |
307 | if (d_is_dir(new_dentry)) { | 307 | if (d_is_dir(new_dentry)) { |
308 | coda_dir_drop_nlink(old_dir); | 308 | coda_dir_drop_nlink(old_dir); |
309 | coda_dir_inc_nlink(new_dir); | 309 | coda_dir_inc_nlink(new_dir); |
310 | } | 310 | } |
311 | coda_dir_update_mtime(old_dir); | 311 | coda_dir_update_mtime(old_dir); |
312 | coda_dir_update_mtime(new_dir); | 312 | coda_dir_update_mtime(new_dir); |
313 | coda_flag_inode(new_dentry->d_inode, C_VATTR); | 313 | coda_flag_inode(d_inode(new_dentry), C_VATTR); |
314 | } else { | 314 | } else { |
315 | coda_flag_inode(old_dir, C_VATTR); | 315 | coda_flag_inode(old_dir, C_VATTR); |
316 | coda_flag_inode(new_dir, C_VATTR); | 316 | coda_flag_inode(new_dir, C_VATTR); |
@@ -449,13 +449,13 @@ static int coda_dentry_revalidate(struct dentry *de, unsigned int flags) | |||
449 | if (flags & LOOKUP_RCU) | 449 | if (flags & LOOKUP_RCU) |
450 | return -ECHILD; | 450 | return -ECHILD; |
451 | 451 | ||
452 | inode = de->d_inode; | 452 | inode = d_inode(de); |
453 | if (!inode || is_root_inode(inode)) | 453 | if (!inode || is_root_inode(inode)) |
454 | goto out; | 454 | goto out; |
455 | if (is_bad_inode(inode)) | 455 | if (is_bad_inode(inode)) |
456 | goto bad; | 456 | goto bad; |
457 | 457 | ||
458 | cii = ITOC(de->d_inode); | 458 | cii = ITOC(d_inode(de)); |
459 | if (!(cii->c_flags & (C_PURGE | C_FLUSH))) | 459 | if (!(cii->c_flags & (C_PURGE | C_FLUSH))) |
460 | goto out; | 460 | goto out; |
461 | 461 | ||
@@ -487,11 +487,11 @@ static int coda_dentry_delete(const struct dentry * dentry) | |||
487 | { | 487 | { |
488 | int flags; | 488 | int flags; |
489 | 489 | ||
490 | if (!dentry->d_inode) | 490 | if (d_really_is_negative(dentry)) |
491 | return 0; | 491 | return 0; |
492 | 492 | ||
493 | flags = (ITOC(dentry->d_inode)->c_flags) & C_PURGE; | 493 | flags = (ITOC(d_inode(dentry))->c_flags) & C_PURGE; |
494 | if (is_bad_inode(dentry->d_inode) || flags) { | 494 | if (is_bad_inode(d_inode(dentry)) || flags) { |
495 | return 1; | 495 | return 1; |
496 | } | 496 | } |
497 | return 0; | 497 | return 0; |
diff --git a/fs/coda/inode.c b/fs/coda/inode.c index 82ec68b59208..cac1390b87a3 100644 --- a/fs/coda/inode.c +++ b/fs/coda/inode.c | |||
@@ -257,15 +257,15 @@ static void coda_evict_inode(struct inode *inode) | |||
257 | 257 | ||
258 | int coda_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat) | 258 | int coda_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat) |
259 | { | 259 | { |
260 | int err = coda_revalidate_inode(dentry->d_inode); | 260 | int err = coda_revalidate_inode(d_inode(dentry)); |
261 | if (!err) | 261 | if (!err) |
262 | generic_fillattr(dentry->d_inode, stat); | 262 | generic_fillattr(d_inode(dentry), stat); |
263 | return err; | 263 | return err; |
264 | } | 264 | } |
265 | 265 | ||
266 | int coda_setattr(struct dentry *de, struct iattr *iattr) | 266 | int coda_setattr(struct dentry *de, struct iattr *iattr) |
267 | { | 267 | { |
268 | struct inode *inode = de->d_inode; | 268 | struct inode *inode = d_inode(de); |
269 | struct coda_vattr vattr; | 269 | struct coda_vattr vattr; |
270 | int error; | 270 | int error; |
271 | 271 | ||
diff --git a/fs/coda/pioctl.c b/fs/coda/pioctl.c index 4326d172fc27..f36a4040afb8 100644 --- a/fs/coda/pioctl.c +++ b/fs/coda/pioctl.c | |||
@@ -72,7 +72,7 @@ static long coda_pioctl(struct file *filp, unsigned int cmd, | |||
72 | if (error) | 72 | if (error) |
73 | return error; | 73 | return error; |
74 | 74 | ||
75 | target_inode = path.dentry->d_inode; | 75 | target_inode = d_inode(path.dentry); |
76 | 76 | ||
77 | /* return if it is not a Coda inode */ | 77 | /* return if it is not a Coda inode */ |
78 | if (target_inode->i_sb != inode->i_sb) { | 78 | if (target_inode->i_sb != inode->i_sb) { |
diff --git a/fs/coda/upcall.c b/fs/coda/upcall.c index 5bb6e27298a4..9b1ffaa0572e 100644 --- a/fs/coda/upcall.c +++ b/fs/coda/upcall.c | |||
@@ -820,8 +820,8 @@ int coda_downcall(struct venus_comm *vcp, int opcode, union outputArgs *out) | |||
820 | case CODA_FLUSH: | 820 | case CODA_FLUSH: |
821 | coda_cache_clear_all(sb); | 821 | coda_cache_clear_all(sb); |
822 | shrink_dcache_sb(sb); | 822 | shrink_dcache_sb(sb); |
823 | if (sb->s_root->d_inode) | 823 | if (d_really_is_positive(sb->s_root)) |
824 | coda_flag_inode(sb->s_root->d_inode, C_FLUSH); | 824 | coda_flag_inode(d_inode(sb->s_root), C_FLUSH); |
825 | break; | 825 | break; |
826 | 826 | ||
827 | case CODA_PURGEUSER: | 827 | case CODA_PURGEUSER: |