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/hfsplus | |
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/hfsplus')
-rw-r--r-- | fs/hfsplus/dir.c | 12 | ||||
-rw-r--r-- | fs/hfsplus/inode.c | 2 | ||||
-rw-r--r-- | fs/hfsplus/ioctl.c | 2 | ||||
-rw-r--r-- | fs/hfsplus/xattr.c | 4 | ||||
-rw-r--r-- | fs/hfsplus/xattr.h | 4 |
5 files changed, 12 insertions, 12 deletions
diff --git a/fs/hfsplus/dir.c b/fs/hfsplus/dir.c index f0235c1640af..e7ef1c72ef3d 100644 --- a/fs/hfsplus/dir.c +++ b/fs/hfsplus/dir.c | |||
@@ -81,7 +81,7 @@ again: | |||
81 | HFSPLUS_I(HFSPLUS_SB(sb)->hidden_dir)-> | 81 | HFSPLUS_I(HFSPLUS_SB(sb)->hidden_dir)-> |
82 | create_date || | 82 | create_date || |
83 | entry.file.create_date == | 83 | entry.file.create_date == |
84 | HFSPLUS_I(sb->s_root->d_inode)-> | 84 | HFSPLUS_I(d_inode(sb->s_root))-> |
85 | create_date) && | 85 | create_date) && |
86 | HFSPLUS_SB(sb)->hidden_dir) { | 86 | HFSPLUS_SB(sb)->hidden_dir) { |
87 | struct qstr str; | 87 | struct qstr str; |
@@ -296,8 +296,8 @@ static int hfsplus_link(struct dentry *src_dentry, struct inode *dst_dir, | |||
296 | struct dentry *dst_dentry) | 296 | struct dentry *dst_dentry) |
297 | { | 297 | { |
298 | struct hfsplus_sb_info *sbi = HFSPLUS_SB(dst_dir->i_sb); | 298 | struct hfsplus_sb_info *sbi = HFSPLUS_SB(dst_dir->i_sb); |
299 | struct inode *inode = src_dentry->d_inode; | 299 | struct inode *inode = d_inode(src_dentry); |
300 | struct inode *src_dir = src_dentry->d_parent->d_inode; | 300 | struct inode *src_dir = d_inode(src_dentry->d_parent); |
301 | struct qstr str; | 301 | struct qstr str; |
302 | char name[32]; | 302 | char name[32]; |
303 | u32 cnid, id; | 303 | u32 cnid, id; |
@@ -353,7 +353,7 @@ out: | |||
353 | static int hfsplus_unlink(struct inode *dir, struct dentry *dentry) | 353 | static int hfsplus_unlink(struct inode *dir, struct dentry *dentry) |
354 | { | 354 | { |
355 | struct hfsplus_sb_info *sbi = HFSPLUS_SB(dir->i_sb); | 355 | struct hfsplus_sb_info *sbi = HFSPLUS_SB(dir->i_sb); |
356 | struct inode *inode = dentry->d_inode; | 356 | struct inode *inode = d_inode(dentry); |
357 | struct qstr str; | 357 | struct qstr str; |
358 | char name[32]; | 358 | char name[32]; |
359 | u32 cnid; | 359 | u32 cnid; |
@@ -410,7 +410,7 @@ out: | |||
410 | static int hfsplus_rmdir(struct inode *dir, struct dentry *dentry) | 410 | static int hfsplus_rmdir(struct inode *dir, struct dentry *dentry) |
411 | { | 411 | { |
412 | struct hfsplus_sb_info *sbi = HFSPLUS_SB(dir->i_sb); | 412 | struct hfsplus_sb_info *sbi = HFSPLUS_SB(dir->i_sb); |
413 | struct inode *inode = dentry->d_inode; | 413 | struct inode *inode = d_inode(dentry); |
414 | int res; | 414 | int res; |
415 | 415 | ||
416 | if (inode->i_size != 2) | 416 | if (inode->i_size != 2) |
@@ -529,7 +529,7 @@ static int hfsplus_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
529 | int res; | 529 | int res; |
530 | 530 | ||
531 | /* Unlink destination if it already exists */ | 531 | /* Unlink destination if it already exists */ |
532 | if (new_dentry->d_inode) { | 532 | if (d_really_is_positive(new_dentry)) { |
533 | if (d_is_dir(new_dentry)) | 533 | if (d_is_dir(new_dentry)) |
534 | res = hfsplus_rmdir(new_dir, new_dentry); | 534 | res = hfsplus_rmdir(new_dir, new_dentry); |
535 | else | 535 | else |
diff --git a/fs/hfsplus/inode.c b/fs/hfsplus/inode.c index a43811f90935..8ad4c594898b 100644 --- a/fs/hfsplus/inode.c +++ b/fs/hfsplus/inode.c | |||
@@ -243,7 +243,7 @@ static int hfsplus_file_release(struct inode *inode, struct file *file) | |||
243 | 243 | ||
244 | static int hfsplus_setattr(struct dentry *dentry, struct iattr *attr) | 244 | static int hfsplus_setattr(struct dentry *dentry, struct iattr *attr) |
245 | { | 245 | { |
246 | struct inode *inode = dentry->d_inode; | 246 | struct inode *inode = d_inode(dentry); |
247 | int error; | 247 | int error; |
248 | 248 | ||
249 | error = inode_change_ok(inode, attr); | 249 | error = inode_change_ok(inode, attr); |
diff --git a/fs/hfsplus/ioctl.c b/fs/hfsplus/ioctl.c index d3ff5cc317d7..ac807073c453 100644 --- a/fs/hfsplus/ioctl.c +++ b/fs/hfsplus/ioctl.c | |||
@@ -26,7 +26,7 @@ | |||
26 | static int hfsplus_ioctl_bless(struct file *file, int __user *user_flags) | 26 | static int hfsplus_ioctl_bless(struct file *file, int __user *user_flags) |
27 | { | 27 | { |
28 | struct dentry *dentry = file->f_path.dentry; | 28 | struct dentry *dentry = file->f_path.dentry; |
29 | struct inode *inode = dentry->d_inode; | 29 | struct inode *inode = d_inode(dentry); |
30 | struct hfsplus_sb_info *sbi = HFSPLUS_SB(inode->i_sb); | 30 | struct hfsplus_sb_info *sbi = HFSPLUS_SB(inode->i_sb); |
31 | struct hfsplus_vh *vh = sbi->s_vhdr; | 31 | struct hfsplus_vh *vh = sbi->s_vhdr; |
32 | struct hfsplus_vh *bvh = sbi->s_backup_vhdr; | 32 | struct hfsplus_vh *bvh = sbi->s_backup_vhdr; |
diff --git a/fs/hfsplus/xattr.c b/fs/hfsplus/xattr.c index d98094a9f476..964d922f647e 100644 --- a/fs/hfsplus/xattr.c +++ b/fs/hfsplus/xattr.c | |||
@@ -574,7 +574,7 @@ static ssize_t hfsplus_listxattr_finder_info(struct dentry *dentry, | |||
574 | char *buffer, size_t size) | 574 | char *buffer, size_t size) |
575 | { | 575 | { |
576 | ssize_t res = 0; | 576 | ssize_t res = 0; |
577 | struct inode *inode = dentry->d_inode; | 577 | struct inode *inode = d_inode(dentry); |
578 | struct hfs_find_data fd; | 578 | struct hfs_find_data fd; |
579 | u16 entry_type; | 579 | u16 entry_type; |
580 | u8 folder_finder_info[sizeof(struct DInfo) + sizeof(struct DXInfo)]; | 580 | u8 folder_finder_info[sizeof(struct DInfo) + sizeof(struct DXInfo)]; |
@@ -642,7 +642,7 @@ ssize_t hfsplus_listxattr(struct dentry *dentry, char *buffer, size_t size) | |||
642 | { | 642 | { |
643 | ssize_t err; | 643 | ssize_t err; |
644 | ssize_t res = 0; | 644 | ssize_t res = 0; |
645 | struct inode *inode = dentry->d_inode; | 645 | struct inode *inode = d_inode(dentry); |
646 | struct hfs_find_data fd; | 646 | struct hfs_find_data fd; |
647 | u16 key_len = 0; | 647 | u16 key_len = 0; |
648 | struct hfsplus_attr_key attr_key; | 648 | struct hfsplus_attr_key attr_key; |
diff --git a/fs/hfsplus/xattr.h b/fs/hfsplus/xattr.h index 288530cf80b5..a1629cfe37d3 100644 --- a/fs/hfsplus/xattr.h +++ b/fs/hfsplus/xattr.h | |||
@@ -24,7 +24,7 @@ int __hfsplus_setxattr(struct inode *inode, const char *name, | |||
24 | static inline int hfsplus_setxattr(struct dentry *dentry, const char *name, | 24 | static inline int hfsplus_setxattr(struct dentry *dentry, const char *name, |
25 | const void *value, size_t size, int flags) | 25 | const void *value, size_t size, int flags) |
26 | { | 26 | { |
27 | return __hfsplus_setxattr(dentry->d_inode, name, value, size, flags); | 27 | return __hfsplus_setxattr(d_inode(dentry), name, value, size, flags); |
28 | } | 28 | } |
29 | 29 | ||
30 | ssize_t __hfsplus_getxattr(struct inode *inode, const char *name, | 30 | ssize_t __hfsplus_getxattr(struct inode *inode, const char *name, |
@@ -35,7 +35,7 @@ static inline ssize_t hfsplus_getxattr(struct dentry *dentry, | |||
35 | void *value, | 35 | void *value, |
36 | size_t size) | 36 | size_t size) |
37 | { | 37 | { |
38 | return __hfsplus_getxattr(dentry->d_inode, name, value, size); | 38 | return __hfsplus_getxattr(d_inode(dentry), name, value, size); |
39 | } | 39 | } |
40 | 40 | ||
41 | ssize_t hfsplus_listxattr(struct dentry *dentry, char *buffer, size_t size); | 41 | ssize_t hfsplus_listxattr(struct dentry *dentry, char *buffer, size_t size); |