aboutsummaryrefslogtreecommitdiffstats
path: root/fs/affs
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2015-03-17 18:25:59 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2015-04-15 15:06:57 -0400
commit2b0143b5c986be1ce8408b3aadc4709e0a94429d (patch)
tree98b1dee70f3d5d9ac9309f4638e41864ddcd0952 /fs/affs
parentce0b16ddf18df35026164fda4a642ef10c01f442 (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/affs')
-rw-r--r--fs/affs/amigaffs.c8
-rw-r--r--fs/affs/inode.c2
-rw-r--r--fs/affs/namei.c10
3 files changed, 10 insertions, 10 deletions
diff --git a/fs/affs/amigaffs.c b/fs/affs/amigaffs.c
index 388da1ea815d..40eb5814b98c 100644
--- a/fs/affs/amigaffs.c
+++ b/fs/affs/amigaffs.c
@@ -138,7 +138,7 @@ affs_fix_dcache(struct inode *inode, u32 entry_ino)
138static int 138static int
139affs_remove_link(struct dentry *dentry) 139affs_remove_link(struct dentry *dentry)
140{ 140{
141 struct inode *dir, *inode = dentry->d_inode; 141 struct inode *dir, *inode = d_inode(dentry);
142 struct super_block *sb = inode->i_sb; 142 struct super_block *sb = inode->i_sb;
143 struct buffer_head *bh = NULL, *link_bh = NULL; 143 struct buffer_head *bh = NULL, *link_bh = NULL;
144 u32 link_ino, ino; 144 u32 link_ino, ino;
@@ -268,11 +268,11 @@ affs_remove_header(struct dentry *dentry)
268 struct buffer_head *bh = NULL; 268 struct buffer_head *bh = NULL;
269 int retval; 269 int retval;
270 270
271 dir = dentry->d_parent->d_inode; 271 dir = d_inode(dentry->d_parent);
272 sb = dir->i_sb; 272 sb = dir->i_sb;
273 273
274 retval = -ENOENT; 274 retval = -ENOENT;
275 inode = dentry->d_inode; 275 inode = d_inode(dentry);
276 if (!inode) 276 if (!inode)
277 goto done; 277 goto done;
278 278
@@ -471,7 +471,7 @@ affs_warning(struct super_block *sb, const char *function, const char *fmt, ...)
471bool 471bool
472affs_nofilenametruncate(const struct dentry *dentry) 472affs_nofilenametruncate(const struct dentry *dentry)
473{ 473{
474 struct inode *inode = dentry->d_inode; 474 struct inode *inode = d_inode(dentry);
475 return AFFS_SB(inode->i_sb)->s_flags & SF_NO_TRUNCATE; 475 return AFFS_SB(inode->i_sb)->s_flags & SF_NO_TRUNCATE;
476 476
477} 477}
diff --git a/fs/affs/inode.c b/fs/affs/inode.c
index 6f34510449e8..57ed17137a13 100644
--- a/fs/affs/inode.c
+++ b/fs/affs/inode.c
@@ -212,7 +212,7 @@ affs_write_inode(struct inode *inode, struct writeback_control *wbc)
212int 212int
213affs_notify_change(struct dentry *dentry, struct iattr *attr) 213affs_notify_change(struct dentry *dentry, struct iattr *attr)
214{ 214{
215 struct inode *inode = dentry->d_inode; 215 struct inode *inode = d_inode(dentry);
216 int error; 216 int error;
217 217
218 pr_debug("notify_change(%lu,0x%x)\n", inode->i_ino, attr->ia_valid); 218 pr_debug("notify_change(%lu,0x%x)\n", inode->i_ino, attr->ia_valid);
diff --git a/fs/affs/namei.c b/fs/affs/namei.c
index ffb7bd82c2a5..372100288ee5 100644
--- a/fs/affs/namei.c
+++ b/fs/affs/namei.c
@@ -250,7 +250,7 @@ int
250affs_unlink(struct inode *dir, struct dentry *dentry) 250affs_unlink(struct inode *dir, struct dentry *dentry)
251{ 251{
252 pr_debug("%s(dir=%lu, %lu \"%pd\")\n", __func__, dir->i_ino, 252 pr_debug("%s(dir=%lu, %lu \"%pd\")\n", __func__, dir->i_ino,
253 dentry->d_inode->i_ino, dentry); 253 d_inode(dentry)->i_ino, dentry);
254 254
255 return affs_remove_header(dentry); 255 return affs_remove_header(dentry);
256} 256}
@@ -318,7 +318,7 @@ int
318affs_rmdir(struct inode *dir, struct dentry *dentry) 318affs_rmdir(struct inode *dir, struct dentry *dentry)
319{ 319{
320 pr_debug("%s(dir=%lu, %lu \"%pd\")\n", __func__, dir->i_ino, 320 pr_debug("%s(dir=%lu, %lu \"%pd\")\n", __func__, dir->i_ino,
321 dentry->d_inode->i_ino, dentry); 321 d_inode(dentry)->i_ino, dentry);
322 322
323 return affs_remove_header(dentry); 323 return affs_remove_header(dentry);
324} 324}
@@ -401,7 +401,7 @@ err:
401int 401int
402affs_link(struct dentry *old_dentry, struct inode *dir, struct dentry *dentry) 402affs_link(struct dentry *old_dentry, struct inode *dir, struct dentry *dentry)
403{ 403{
404 struct inode *inode = old_dentry->d_inode; 404 struct inode *inode = d_inode(old_dentry);
405 405
406 pr_debug("%s(%lu, %lu, \"%pd\")\n", __func__, inode->i_ino, dir->i_ino, 406 pr_debug("%s(%lu, %lu, \"%pd\")\n", __func__, inode->i_ino, dir->i_ino,
407 dentry); 407 dentry);
@@ -428,13 +428,13 @@ affs_rename(struct inode *old_dir, struct dentry *old_dentry,
428 return retval; 428 return retval;
429 429
430 /* Unlink destination if it already exists */ 430 /* Unlink destination if it already exists */
431 if (new_dentry->d_inode) { 431 if (d_really_is_positive(new_dentry)) {
432 retval = affs_remove_header(new_dentry); 432 retval = affs_remove_header(new_dentry);
433 if (retval) 433 if (retval)
434 return retval; 434 return retval;
435 } 435 }
436 436
437 bh = affs_bread(sb, old_dentry->d_inode->i_ino); 437 bh = affs_bread(sb, d_inode(old_dentry)->i_ino);
438 if (!bh) 438 if (!bh)
439 return -EIO; 439 return -EIO;
440 440