diff options
author | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2011-05-04 23:56:51 -0400 |
---|---|---|
committer | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2011-05-10 09:21:56 -0400 |
commit | 0ef28f9aec4dccfba33cef74412f601c1b48b658 (patch) | |
tree | 12018cde66a20b8e8804c11296ac19a3aec59fea /fs/nilfs2/gcinode.c | |
parent | 0cc1283881d3fcc9011c713e067795ccec322ae7 (diff) |
nilfs2: get rid of NILFS_I_NILFS
This replaces all references of NILFS_I_NILFS(inode)->ns_bdev with
inode->i_sb->s_bdev and unfolds remaining uses of NILFS_I_NILFS inline
function.
Before 2.6.37, referring to a nilfs object from inodes needed a
conditional judgement, and NILFS_I_NILFS was helpful to simplify it.
But now we can simply do it by going through a super block instance
like inode->i_sb->s_fs_info.
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Diffstat (limited to 'fs/nilfs2/gcinode.c')
-rw-r--r-- | fs/nilfs2/gcinode.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/nilfs2/gcinode.c b/fs/nilfs2/gcinode.c index 6f0d60a0fd6a..6e79ac0f49a1 100644 --- a/fs/nilfs2/gcinode.c +++ b/fs/nilfs2/gcinode.c | |||
@@ -84,9 +84,9 @@ int nilfs_gccache_submit_read_data(struct inode *inode, sector_t blkoff, | |||
84 | goto out; | 84 | goto out; |
85 | 85 | ||
86 | if (pbn == 0) { | 86 | if (pbn == 0) { |
87 | struct inode *dat_inode = NILFS_I_NILFS(inode)->ns_dat; | 87 | struct the_nilfs *nilfs = inode->i_sb->s_fs_info; |
88 | /* use original dat, not gc dat. */ | 88 | |
89 | err = nilfs_dat_translate(dat_inode, vbn, &pbn); | 89 | err = nilfs_dat_translate(nilfs->ns_dat, vbn, &pbn); |
90 | if (unlikely(err)) { /* -EIO, -ENOMEM, -ENOENT */ | 90 | if (unlikely(err)) { /* -EIO, -ENOMEM, -ENOENT */ |
91 | brelse(bh); | 91 | brelse(bh); |
92 | goto failed; | 92 | goto failed; |
@@ -100,7 +100,7 @@ int nilfs_gccache_submit_read_data(struct inode *inode, sector_t blkoff, | |||
100 | } | 100 | } |
101 | 101 | ||
102 | if (!buffer_mapped(bh)) { | 102 | if (!buffer_mapped(bh)) { |
103 | bh->b_bdev = NILFS_I_NILFS(inode)->ns_bdev; | 103 | bh->b_bdev = inode->i_sb->s_bdev; |
104 | set_buffer_mapped(bh); | 104 | set_buffer_mapped(bh); |
105 | } | 105 | } |
106 | bh->b_blocknr = pbn; | 106 | bh->b_blocknr = pbn; |