aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nilfs2
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/nilfs2
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/nilfs2')
-rw-r--r--fs/nilfs2/dir.c2
-rw-r--r--fs/nilfs2/inode.c2
-rw-r--r--fs/nilfs2/namei.c18
-rw-r--r--fs/nilfs2/super.c6
4 files changed, 14 insertions, 14 deletions
diff --git a/fs/nilfs2/dir.c b/fs/nilfs2/dir.c
index 197a63e9d102..0ee0bed3649b 100644
--- a/fs/nilfs2/dir.c
+++ b/fs/nilfs2/dir.c
@@ -435,7 +435,7 @@ void nilfs_set_link(struct inode *dir, struct nilfs_dir_entry *de,
435 */ 435 */
436int nilfs_add_link(struct dentry *dentry, struct inode *inode) 436int nilfs_add_link(struct dentry *dentry, struct inode *inode)
437{ 437{
438 struct inode *dir = dentry->d_parent->d_inode; 438 struct inode *dir = d_inode(dentry->d_parent);
439 const unsigned char *name = dentry->d_name.name; 439 const unsigned char *name = dentry->d_name.name;
440 int namelen = dentry->d_name.len; 440 int namelen = dentry->d_name.len;
441 unsigned chunk_size = nilfs_chunk_size(dir); 441 unsigned chunk_size = nilfs_chunk_size(dir);
diff --git a/fs/nilfs2/inode.c b/fs/nilfs2/inode.c
index 36f057fa8aa3..310d87c51b40 100644
--- a/fs/nilfs2/inode.c
+++ b/fs/nilfs2/inode.c
@@ -834,7 +834,7 @@ void nilfs_evict_inode(struct inode *inode)
834int nilfs_setattr(struct dentry *dentry, struct iattr *iattr) 834int nilfs_setattr(struct dentry *dentry, struct iattr *iattr)
835{ 835{
836 struct nilfs_transaction_info ti; 836 struct nilfs_transaction_info ti;
837 struct inode *inode = dentry->d_inode; 837 struct inode *inode = d_inode(dentry);
838 struct super_block *sb = inode->i_sb; 838 struct super_block *sb = inode->i_sb;
839 int err; 839 int err;
840 840
diff --git a/fs/nilfs2/namei.c b/fs/nilfs2/namei.c
index 0f84b257932c..22180836ec22 100644
--- a/fs/nilfs2/namei.c
+++ b/fs/nilfs2/namei.c
@@ -192,7 +192,7 @@ out_fail:
192static int nilfs_link(struct dentry *old_dentry, struct inode *dir, 192static int nilfs_link(struct dentry *old_dentry, struct inode *dir,
193 struct dentry *dentry) 193 struct dentry *dentry)
194{ 194{
195 struct inode *inode = old_dentry->d_inode; 195 struct inode *inode = d_inode(old_dentry);
196 struct nilfs_transaction_info ti; 196 struct nilfs_transaction_info ti;
197 int err; 197 int err;
198 198
@@ -283,7 +283,7 @@ static int nilfs_do_unlink(struct inode *dir, struct dentry *dentry)
283 if (!de) 283 if (!de)
284 goto out; 284 goto out;
285 285
286 inode = dentry->d_inode; 286 inode = d_inode(dentry);
287 err = -EIO; 287 err = -EIO;
288 if (le64_to_cpu(de->inode) != inode->i_ino) 288 if (le64_to_cpu(de->inode) != inode->i_ino)
289 goto out; 289 goto out;
@@ -318,7 +318,7 @@ static int nilfs_unlink(struct inode *dir, struct dentry *dentry)
318 318
319 if (!err) { 319 if (!err) {
320 nilfs_mark_inode_dirty(dir); 320 nilfs_mark_inode_dirty(dir);
321 nilfs_mark_inode_dirty(dentry->d_inode); 321 nilfs_mark_inode_dirty(d_inode(dentry));
322 err = nilfs_transaction_commit(dir->i_sb); 322 err = nilfs_transaction_commit(dir->i_sb);
323 } else 323 } else
324 nilfs_transaction_abort(dir->i_sb); 324 nilfs_transaction_abort(dir->i_sb);
@@ -328,7 +328,7 @@ static int nilfs_unlink(struct inode *dir, struct dentry *dentry)
328 328
329static int nilfs_rmdir(struct inode *dir, struct dentry *dentry) 329static int nilfs_rmdir(struct inode *dir, struct dentry *dentry)
330{ 330{
331 struct inode *inode = dentry->d_inode; 331 struct inode *inode = d_inode(dentry);
332 struct nilfs_transaction_info ti; 332 struct nilfs_transaction_info ti;
333 int err; 333 int err;
334 334
@@ -358,8 +358,8 @@ static int nilfs_rmdir(struct inode *dir, struct dentry *dentry)
358static int nilfs_rename(struct inode *old_dir, struct dentry *old_dentry, 358static int nilfs_rename(struct inode *old_dir, struct dentry *old_dentry,
359 struct inode *new_dir, struct dentry *new_dentry) 359 struct inode *new_dir, struct dentry *new_dentry)
360{ 360{
361 struct inode *old_inode = old_dentry->d_inode; 361 struct inode *old_inode = d_inode(old_dentry);
362 struct inode *new_inode = new_dentry->d_inode; 362 struct inode *new_inode = d_inode(new_dentry);
363 struct page *dir_page = NULL; 363 struct page *dir_page = NULL;
364 struct nilfs_dir_entry *dir_de = NULL; 364 struct nilfs_dir_entry *dir_de = NULL;
365 struct page *old_page; 365 struct page *old_page;
@@ -453,13 +453,13 @@ static struct dentry *nilfs_get_parent(struct dentry *child)
453 struct qstr dotdot = QSTR_INIT("..", 2); 453 struct qstr dotdot = QSTR_INIT("..", 2);
454 struct nilfs_root *root; 454 struct nilfs_root *root;
455 455
456 ino = nilfs_inode_by_name(child->d_inode, &dotdot); 456 ino = nilfs_inode_by_name(d_inode(child), &dotdot);
457 if (!ino) 457 if (!ino)
458 return ERR_PTR(-ENOENT); 458 return ERR_PTR(-ENOENT);
459 459
460 root = NILFS_I(child->d_inode)->i_root; 460 root = NILFS_I(d_inode(child))->i_root;
461 461
462 inode = nilfs_iget(child->d_inode->i_sb, root, ino); 462 inode = nilfs_iget(d_inode(child)->i_sb, root, ino);
463 if (IS_ERR(inode)) 463 if (IS_ERR(inode))
464 return ERR_CAST(inode); 464 return ERR_CAST(inode);
465 465
diff --git a/fs/nilfs2/super.c b/fs/nilfs2/super.c
index 5bc2a1cf73c3..282fb1037823 100644
--- a/fs/nilfs2/super.c
+++ b/fs/nilfs2/super.c
@@ -610,7 +610,7 @@ static int nilfs_unfreeze(struct super_block *sb)
610static int nilfs_statfs(struct dentry *dentry, struct kstatfs *buf) 610static int nilfs_statfs(struct dentry *dentry, struct kstatfs *buf)
611{ 611{
612 struct super_block *sb = dentry->d_sb; 612 struct super_block *sb = dentry->d_sb;
613 struct nilfs_root *root = NILFS_I(dentry->d_inode)->i_root; 613 struct nilfs_root *root = NILFS_I(d_inode(dentry))->i_root;
614 struct the_nilfs *nilfs = root->nilfs; 614 struct the_nilfs *nilfs = root->nilfs;
615 u64 id = huge_encode_dev(sb->s_bdev->bd_dev); 615 u64 id = huge_encode_dev(sb->s_bdev->bd_dev);
616 unsigned long long blocks; 616 unsigned long long blocks;
@@ -681,7 +681,7 @@ static int nilfs_show_options(struct seq_file *seq, struct dentry *dentry)
681{ 681{
682 struct super_block *sb = dentry->d_sb; 682 struct super_block *sb = dentry->d_sb;
683 struct the_nilfs *nilfs = sb->s_fs_info; 683 struct the_nilfs *nilfs = sb->s_fs_info;
684 struct nilfs_root *root = NILFS_I(dentry->d_inode)->i_root; 684 struct nilfs_root *root = NILFS_I(d_inode(dentry))->i_root;
685 685
686 if (!nilfs_test_opt(nilfs, BARRIER)) 686 if (!nilfs_test_opt(nilfs, BARRIER))
687 seq_puts(seq, ",nobarrier"); 687 seq_puts(seq, ",nobarrier");
@@ -1190,7 +1190,7 @@ static int nilfs_remount(struct super_block *sb, int *flags, char *data)
1190 1190
1191 sb->s_flags &= ~MS_RDONLY; 1191 sb->s_flags &= ~MS_RDONLY;
1192 1192
1193 root = NILFS_I(sb->s_root->d_inode)->i_root; 1193 root = NILFS_I(d_inode(sb->s_root))->i_root;
1194 err = nilfs_attach_log_writer(sb, root); 1194 err = nilfs_attach_log_writer(sb, root);
1195 if (err) 1195 if (err)
1196 goto restore_opts; 1196 goto restore_opts;