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/f2fs | |
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/f2fs')
-rw-r--r-- | fs/f2fs/f2fs.h | 2 | ||||
-rw-r--r-- | fs/f2fs/file.c | 4 | ||||
-rw-r--r-- | fs/f2fs/namei.c | 18 | ||||
-rw-r--r-- | fs/f2fs/xattr.c | 10 |
4 files changed, 17 insertions, 17 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 7fa3313ab0e2..02e4ab3e7d4d 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h | |||
@@ -1391,7 +1391,7 @@ bool f2fs_empty_dir(struct inode *); | |||
1391 | 1391 | ||
1392 | static inline int f2fs_add_link(struct dentry *dentry, struct inode *inode) | 1392 | static inline int f2fs_add_link(struct dentry *dentry, struct inode *inode) |
1393 | { | 1393 | { |
1394 | return __f2fs_add_link(dentry->d_parent->d_inode, &dentry->d_name, | 1394 | return __f2fs_add_link(d_inode(dentry->d_parent), &dentry->d_name, |
1395 | inode); | 1395 | inode); |
1396 | } | 1396 | } |
1397 | 1397 | ||
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index df6a0596eccf..71a74f1e2bfb 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c | |||
@@ -562,7 +562,7 @@ void f2fs_truncate(struct inode *inode) | |||
562 | int f2fs_getattr(struct vfsmount *mnt, | 562 | int f2fs_getattr(struct vfsmount *mnt, |
563 | struct dentry *dentry, struct kstat *stat) | 563 | struct dentry *dentry, struct kstat *stat) |
564 | { | 564 | { |
565 | struct inode *inode = dentry->d_inode; | 565 | struct inode *inode = d_inode(dentry); |
566 | generic_fillattr(inode, stat); | 566 | generic_fillattr(inode, stat); |
567 | stat->blocks <<= 3; | 567 | stat->blocks <<= 3; |
568 | return 0; | 568 | return 0; |
@@ -601,7 +601,7 @@ static void __setattr_copy(struct inode *inode, const struct iattr *attr) | |||
601 | 601 | ||
602 | int f2fs_setattr(struct dentry *dentry, struct iattr *attr) | 602 | int f2fs_setattr(struct dentry *dentry, struct iattr *attr) |
603 | { | 603 | { |
604 | struct inode *inode = dentry->d_inode; | 604 | struct inode *inode = d_inode(dentry); |
605 | struct f2fs_inode_info *fi = F2FS_I(inode); | 605 | struct f2fs_inode_info *fi = F2FS_I(inode); |
606 | int err; | 606 | int err; |
607 | 607 | ||
diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c index e79639a9787a..ed7404706ca4 100644 --- a/fs/f2fs/namei.c +++ b/fs/f2fs/namei.c | |||
@@ -150,7 +150,7 @@ out: | |||
150 | static int f2fs_link(struct dentry *old_dentry, struct inode *dir, | 150 | static int f2fs_link(struct dentry *old_dentry, struct inode *dir, |
151 | struct dentry *dentry) | 151 | struct dentry *dentry) |
152 | { | 152 | { |
153 | struct inode *inode = old_dentry->d_inode; | 153 | struct inode *inode = d_inode(old_dentry); |
154 | struct f2fs_sb_info *sbi = F2FS_I_SB(dir); | 154 | struct f2fs_sb_info *sbi = F2FS_I_SB(dir); |
155 | int err; | 155 | int err; |
156 | 156 | ||
@@ -181,10 +181,10 @@ out: | |||
181 | struct dentry *f2fs_get_parent(struct dentry *child) | 181 | struct dentry *f2fs_get_parent(struct dentry *child) |
182 | { | 182 | { |
183 | struct qstr dotdot = QSTR_INIT("..", 2); | 183 | struct qstr dotdot = QSTR_INIT("..", 2); |
184 | unsigned long ino = f2fs_inode_by_name(child->d_inode, &dotdot); | 184 | unsigned long ino = f2fs_inode_by_name(d_inode(child), &dotdot); |
185 | if (!ino) | 185 | if (!ino) |
186 | return ERR_PTR(-ENOENT); | 186 | return ERR_PTR(-ENOENT); |
187 | return d_obtain_alias(f2fs_iget(child->d_inode->i_sb, ino)); | 187 | return d_obtain_alias(f2fs_iget(d_inode(child)->i_sb, ino)); |
188 | } | 188 | } |
189 | 189 | ||
190 | static struct dentry *f2fs_lookup(struct inode *dir, struct dentry *dentry, | 190 | static struct dentry *f2fs_lookup(struct inode *dir, struct dentry *dentry, |
@@ -214,7 +214,7 @@ static struct dentry *f2fs_lookup(struct inode *dir, struct dentry *dentry, | |||
214 | static int f2fs_unlink(struct inode *dir, struct dentry *dentry) | 214 | static int f2fs_unlink(struct inode *dir, struct dentry *dentry) |
215 | { | 215 | { |
216 | struct f2fs_sb_info *sbi = F2FS_I_SB(dir); | 216 | struct f2fs_sb_info *sbi = F2FS_I_SB(dir); |
217 | struct inode *inode = dentry->d_inode; | 217 | struct inode *inode = d_inode(dentry); |
218 | struct f2fs_dir_entry *de; | 218 | struct f2fs_dir_entry *de; |
219 | struct page *page; | 219 | struct page *page; |
220 | int err = -ENOENT; | 220 | int err = -ENOENT; |
@@ -326,7 +326,7 @@ out_fail: | |||
326 | 326 | ||
327 | static int f2fs_rmdir(struct inode *dir, struct dentry *dentry) | 327 | static int f2fs_rmdir(struct inode *dir, struct dentry *dentry) |
328 | { | 328 | { |
329 | struct inode *inode = dentry->d_inode; | 329 | struct inode *inode = d_inode(dentry); |
330 | if (f2fs_empty_dir(inode)) | 330 | if (f2fs_empty_dir(inode)) |
331 | return f2fs_unlink(dir, dentry); | 331 | return f2fs_unlink(dir, dentry); |
332 | return -ENOTEMPTY; | 332 | return -ENOTEMPTY; |
@@ -374,8 +374,8 @@ static int f2fs_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
374 | struct inode *new_dir, struct dentry *new_dentry) | 374 | struct inode *new_dir, struct dentry *new_dentry) |
375 | { | 375 | { |
376 | struct f2fs_sb_info *sbi = F2FS_I_SB(old_dir); | 376 | struct f2fs_sb_info *sbi = F2FS_I_SB(old_dir); |
377 | struct inode *old_inode = old_dentry->d_inode; | 377 | struct inode *old_inode = d_inode(old_dentry); |
378 | struct inode *new_inode = new_dentry->d_inode; | 378 | struct inode *new_inode = d_inode(new_dentry); |
379 | struct page *old_dir_page; | 379 | struct page *old_dir_page; |
380 | struct page *old_page, *new_page; | 380 | struct page *old_page, *new_page; |
381 | struct f2fs_dir_entry *old_dir_entry = NULL; | 381 | struct f2fs_dir_entry *old_dir_entry = NULL; |
@@ -501,8 +501,8 @@ static int f2fs_cross_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
501 | struct inode *new_dir, struct dentry *new_dentry) | 501 | struct inode *new_dir, struct dentry *new_dentry) |
502 | { | 502 | { |
503 | struct f2fs_sb_info *sbi = F2FS_I_SB(old_dir); | 503 | struct f2fs_sb_info *sbi = F2FS_I_SB(old_dir); |
504 | struct inode *old_inode = old_dentry->d_inode; | 504 | struct inode *old_inode = d_inode(old_dentry); |
505 | struct inode *new_inode = new_dentry->d_inode; | 505 | struct inode *new_inode = d_inode(new_dentry); |
506 | struct page *old_dir_page, *new_dir_page; | 506 | struct page *old_dir_page, *new_dir_page; |
507 | struct page *old_page, *new_page; | 507 | struct page *old_page, *new_page; |
508 | struct f2fs_dir_entry *old_dir_entry = NULL, *new_dir_entry = NULL; | 508 | struct f2fs_dir_entry *old_dir_entry = NULL, *new_dir_entry = NULL; |
diff --git a/fs/f2fs/xattr.c b/fs/f2fs/xattr.c index 5072bf9ae0ef..62c82f35087e 100644 --- a/fs/f2fs/xattr.c +++ b/fs/f2fs/xattr.c | |||
@@ -83,7 +83,7 @@ static int f2fs_xattr_generic_get(struct dentry *dentry, const char *name, | |||
83 | } | 83 | } |
84 | if (strcmp(name, "") == 0) | 84 | if (strcmp(name, "") == 0) |
85 | return -EINVAL; | 85 | return -EINVAL; |
86 | return f2fs_getxattr(dentry->d_inode, type, name, buffer, size, NULL); | 86 | return f2fs_getxattr(d_inode(dentry), type, name, buffer, size, NULL); |
87 | } | 87 | } |
88 | 88 | ||
89 | static int f2fs_xattr_generic_set(struct dentry *dentry, const char *name, | 89 | static int f2fs_xattr_generic_set(struct dentry *dentry, const char *name, |
@@ -108,7 +108,7 @@ static int f2fs_xattr_generic_set(struct dentry *dentry, const char *name, | |||
108 | if (strcmp(name, "") == 0) | 108 | if (strcmp(name, "") == 0) |
109 | return -EINVAL; | 109 | return -EINVAL; |
110 | 110 | ||
111 | return f2fs_setxattr(dentry->d_inode, type, name, | 111 | return f2fs_setxattr(d_inode(dentry), type, name, |
112 | value, size, NULL, flags); | 112 | value, size, NULL, flags); |
113 | } | 113 | } |
114 | 114 | ||
@@ -130,7 +130,7 @@ static size_t f2fs_xattr_advise_list(struct dentry *dentry, char *list, | |||
130 | static int f2fs_xattr_advise_get(struct dentry *dentry, const char *name, | 130 | static int f2fs_xattr_advise_get(struct dentry *dentry, const char *name, |
131 | void *buffer, size_t size, int type) | 131 | void *buffer, size_t size, int type) |
132 | { | 132 | { |
133 | struct inode *inode = dentry->d_inode; | 133 | struct inode *inode = d_inode(dentry); |
134 | 134 | ||
135 | if (strcmp(name, "") != 0) | 135 | if (strcmp(name, "") != 0) |
136 | return -EINVAL; | 136 | return -EINVAL; |
@@ -142,7 +142,7 @@ static int f2fs_xattr_advise_get(struct dentry *dentry, const char *name, | |||
142 | static int f2fs_xattr_advise_set(struct dentry *dentry, const char *name, | 142 | static int f2fs_xattr_advise_set(struct dentry *dentry, const char *name, |
143 | const void *value, size_t size, int flags, int type) | 143 | const void *value, size_t size, int flags, int type) |
144 | { | 144 | { |
145 | struct inode *inode = dentry->d_inode; | 145 | struct inode *inode = d_inode(dentry); |
146 | 146 | ||
147 | if (strcmp(name, "") != 0) | 147 | if (strcmp(name, "") != 0) |
148 | return -EINVAL; | 148 | return -EINVAL; |
@@ -442,7 +442,7 @@ cleanup: | |||
442 | 442 | ||
443 | ssize_t f2fs_listxattr(struct dentry *dentry, char *buffer, size_t buffer_size) | 443 | ssize_t f2fs_listxattr(struct dentry *dentry, char *buffer, size_t buffer_size) |
444 | { | 444 | { |
445 | struct inode *inode = dentry->d_inode; | 445 | struct inode *inode = d_inode(dentry); |
446 | struct f2fs_xattr_entry *entry; | 446 | struct f2fs_xattr_entry *entry; |
447 | void *base_addr; | 447 | void *base_addr; |
448 | int error = 0; | 448 | int error = 0; |