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/fat | |
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/fat')
-rw-r--r-- | fs/fat/file.c | 4 | ||||
-rw-r--r-- | fs/fat/namei_msdos.c | 8 | ||||
-rw-r--r-- | fs/fat/namei_vfat.c | 14 | ||||
-rw-r--r-- | fs/fat/nfs.c | 4 |
4 files changed, 15 insertions, 15 deletions
diff --git a/fs/fat/file.c b/fs/fat/file.c index 1e98d333879f..54646829e08e 100644 --- a/fs/fat/file.c +++ b/fs/fat/file.c | |||
@@ -309,7 +309,7 @@ void fat_truncate_blocks(struct inode *inode, loff_t offset) | |||
309 | 309 | ||
310 | int fat_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat) | 310 | int fat_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat) |
311 | { | 311 | { |
312 | struct inode *inode = dentry->d_inode; | 312 | struct inode *inode = d_inode(dentry); |
313 | generic_fillattr(inode, stat); | 313 | generic_fillattr(inode, stat); |
314 | stat->blksize = MSDOS_SB(inode->i_sb)->cluster_size; | 314 | stat->blksize = MSDOS_SB(inode->i_sb)->cluster_size; |
315 | 315 | ||
@@ -381,7 +381,7 @@ static int fat_allow_set_time(struct msdos_sb_info *sbi, struct inode *inode) | |||
381 | int fat_setattr(struct dentry *dentry, struct iattr *attr) | 381 | int fat_setattr(struct dentry *dentry, struct iattr *attr) |
382 | { | 382 | { |
383 | struct msdos_sb_info *sbi = MSDOS_SB(dentry->d_sb); | 383 | struct msdos_sb_info *sbi = MSDOS_SB(dentry->d_sb); |
384 | struct inode *inode = dentry->d_inode; | 384 | struct inode *inode = d_inode(dentry); |
385 | unsigned int ia_valid; | 385 | unsigned int ia_valid; |
386 | int error; | 386 | int error; |
387 | 387 | ||
diff --git a/fs/fat/namei_msdos.c b/fs/fat/namei_msdos.c index a783b0e1272a..e68e794c71d2 100644 --- a/fs/fat/namei_msdos.c +++ b/fs/fat/namei_msdos.c | |||
@@ -310,7 +310,7 @@ out: | |||
310 | static int msdos_rmdir(struct inode *dir, struct dentry *dentry) | 310 | static int msdos_rmdir(struct inode *dir, struct dentry *dentry) |
311 | { | 311 | { |
312 | struct super_block *sb = dir->i_sb; | 312 | struct super_block *sb = dir->i_sb; |
313 | struct inode *inode = dentry->d_inode; | 313 | struct inode *inode = d_inode(dentry); |
314 | struct fat_slot_info sinfo; | 314 | struct fat_slot_info sinfo; |
315 | int err; | 315 | int err; |
316 | 316 | ||
@@ -404,7 +404,7 @@ out: | |||
404 | /***** Unlink a file */ | 404 | /***** Unlink a file */ |
405 | static int msdos_unlink(struct inode *dir, struct dentry *dentry) | 405 | static int msdos_unlink(struct inode *dir, struct dentry *dentry) |
406 | { | 406 | { |
407 | struct inode *inode = dentry->d_inode; | 407 | struct inode *inode = d_inode(dentry); |
408 | struct super_block *sb = inode->i_sb; | 408 | struct super_block *sb = inode->i_sb; |
409 | struct fat_slot_info sinfo; | 409 | struct fat_slot_info sinfo; |
410 | int err; | 410 | int err; |
@@ -442,8 +442,8 @@ static int do_msdos_rename(struct inode *old_dir, unsigned char *old_name, | |||
442 | int err, old_attrs, is_dir, update_dotdot, corrupt = 0; | 442 | int err, old_attrs, is_dir, update_dotdot, corrupt = 0; |
443 | 443 | ||
444 | old_sinfo.bh = sinfo.bh = dotdot_bh = NULL; | 444 | old_sinfo.bh = sinfo.bh = dotdot_bh = NULL; |
445 | old_inode = old_dentry->d_inode; | 445 | old_inode = d_inode(old_dentry); |
446 | new_inode = new_dentry->d_inode; | 446 | new_inode = d_inode(new_dentry); |
447 | 447 | ||
448 | err = fat_scan(old_dir, old_name, &old_sinfo); | 448 | err = fat_scan(old_dir, old_name, &old_sinfo); |
449 | if (err) { | 449 | if (err) { |
diff --git a/fs/fat/namei_vfat.c b/fs/fat/namei_vfat.c index b8b92c2f9683..af400ab27d48 100644 --- a/fs/fat/namei_vfat.c +++ b/fs/fat/namei_vfat.c | |||
@@ -35,7 +35,7 @@ static int vfat_revalidate_shortname(struct dentry *dentry) | |||
35 | { | 35 | { |
36 | int ret = 1; | 36 | int ret = 1; |
37 | spin_lock(&dentry->d_lock); | 37 | spin_lock(&dentry->d_lock); |
38 | if (dentry->d_time != dentry->d_parent->d_inode->i_version) | 38 | if (dentry->d_time != d_inode(dentry->d_parent)->i_version) |
39 | ret = 0; | 39 | ret = 0; |
40 | spin_unlock(&dentry->d_lock); | 40 | spin_unlock(&dentry->d_lock); |
41 | return ret; | 41 | return ret; |
@@ -47,7 +47,7 @@ static int vfat_revalidate(struct dentry *dentry, unsigned int flags) | |||
47 | return -ECHILD; | 47 | return -ECHILD; |
48 | 48 | ||
49 | /* This is not negative dentry. Always valid. */ | 49 | /* This is not negative dentry. Always valid. */ |
50 | if (dentry->d_inode) | 50 | if (d_really_is_positive(dentry)) |
51 | return 1; | 51 | return 1; |
52 | return vfat_revalidate_shortname(dentry); | 52 | return vfat_revalidate_shortname(dentry); |
53 | } | 53 | } |
@@ -67,7 +67,7 @@ static int vfat_revalidate_ci(struct dentry *dentry, unsigned int flags) | |||
67 | * positive dentry isn't good idea. So it's unsupported like | 67 | * positive dentry isn't good idea. So it's unsupported like |
68 | * rename("filename", "FILENAME") for now. | 68 | * rename("filename", "FILENAME") for now. |
69 | */ | 69 | */ |
70 | if (dentry->d_inode) | 70 | if (d_really_is_positive(dentry)) |
71 | return 1; | 71 | return 1; |
72 | 72 | ||
73 | /* | 73 | /* |
@@ -803,7 +803,7 @@ out: | |||
803 | 803 | ||
804 | static int vfat_rmdir(struct inode *dir, struct dentry *dentry) | 804 | static int vfat_rmdir(struct inode *dir, struct dentry *dentry) |
805 | { | 805 | { |
806 | struct inode *inode = dentry->d_inode; | 806 | struct inode *inode = d_inode(dentry); |
807 | struct super_block *sb = dir->i_sb; | 807 | struct super_block *sb = dir->i_sb; |
808 | struct fat_slot_info sinfo; | 808 | struct fat_slot_info sinfo; |
809 | int err; | 809 | int err; |
@@ -834,7 +834,7 @@ out: | |||
834 | 834 | ||
835 | static int vfat_unlink(struct inode *dir, struct dentry *dentry) | 835 | static int vfat_unlink(struct inode *dir, struct dentry *dentry) |
836 | { | 836 | { |
837 | struct inode *inode = dentry->d_inode; | 837 | struct inode *inode = d_inode(dentry); |
838 | struct super_block *sb = dir->i_sb; | 838 | struct super_block *sb = dir->i_sb; |
839 | struct fat_slot_info sinfo; | 839 | struct fat_slot_info sinfo; |
840 | int err; | 840 | int err; |
@@ -917,8 +917,8 @@ static int vfat_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
917 | struct super_block *sb = old_dir->i_sb; | 917 | struct super_block *sb = old_dir->i_sb; |
918 | 918 | ||
919 | old_sinfo.bh = sinfo.bh = dotdot_bh = NULL; | 919 | old_sinfo.bh = sinfo.bh = dotdot_bh = NULL; |
920 | old_inode = old_dentry->d_inode; | 920 | old_inode = d_inode(old_dentry); |
921 | new_inode = new_dentry->d_inode; | 921 | new_inode = d_inode(new_dentry); |
922 | mutex_lock(&MSDOS_SB(sb)->s_lock); | 922 | mutex_lock(&MSDOS_SB(sb)->s_lock); |
923 | err = vfat_find(old_dir, &old_dentry->d_name, &old_sinfo); | 923 | err = vfat_find(old_dir, &old_dentry->d_name, &old_sinfo); |
924 | if (err) | 924 | if (err) |
diff --git a/fs/fat/nfs.c b/fs/fat/nfs.c index 93e14933dcb6..eb192656fba2 100644 --- a/fs/fat/nfs.c +++ b/fs/fat/nfs.c | |||
@@ -266,7 +266,7 @@ struct inode *fat_rebuild_parent(struct super_block *sb, int parent_logstart) | |||
266 | * Find the parent for a directory that is not currently connected to | 266 | * Find the parent for a directory that is not currently connected to |
267 | * the filesystem root. | 267 | * the filesystem root. |
268 | * | 268 | * |
269 | * On entry, the caller holds child_dir->d_inode->i_mutex. | 269 | * On entry, the caller holds d_inode(child_dir)->i_mutex. |
270 | */ | 270 | */ |
271 | static struct dentry *fat_get_parent(struct dentry *child_dir) | 271 | static struct dentry *fat_get_parent(struct dentry *child_dir) |
272 | { | 272 | { |
@@ -276,7 +276,7 @@ static struct dentry *fat_get_parent(struct dentry *child_dir) | |||
276 | struct inode *parent_inode = NULL; | 276 | struct inode *parent_inode = NULL; |
277 | struct msdos_sb_info *sbi = MSDOS_SB(sb); | 277 | struct msdos_sb_info *sbi = MSDOS_SB(sb); |
278 | 278 | ||
279 | if (!fat_get_dotdot_entry(child_dir->d_inode, &bh, &de)) { | 279 | if (!fat_get_dotdot_entry(d_inode(child_dir), &bh, &de)) { |
280 | int parent_logstart = fat_get_start(sbi, de); | 280 | int parent_logstart = fat_get_start(sbi, de); |
281 | parent_inode = fat_dget(sb, parent_logstart); | 281 | parent_inode = fat_dget(sb, parent_logstart); |
282 | if (!parent_inode && sbi->options.nfs == FAT_NFS_NOSTALE_RO) | 282 | if (!parent_inode && sbi->options.nfs == FAT_NFS_NOSTALE_RO) |