diff options
author | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2010-12-26 10:07:30 -0500 |
---|---|---|
committer | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2011-01-10 00:38:39 -0500 |
commit | 365e215ce1f154e288ff0f7c9acbdf5421f57949 (patch) | |
tree | 864a8cadeb2c373a0fbbbd90464cf745ac7616f7 /fs/nilfs2/inode.c | |
parent | bcbc8c648d6cc88f771435d8031c1a13e00945ed (diff) |
nilfs2: unfold nilfs_dat_inode function
nilfs_dat_inode function was a wrapper to switch between normal dat
inode and gcdat, a clone of the dat inode for garbage collection.
This function got obsolete when the gcdat inode was removed, and now
we can access the dat inode directly from a nilfs object. So, we will
unfold the wrapper and remove it.
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Diffstat (limited to 'fs/nilfs2/inode.c')
-rw-r--r-- | fs/nilfs2/inode.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/fs/nilfs2/inode.c b/fs/nilfs2/inode.c index 43416470e07b..2fd440d8d6b8 100644 --- a/fs/nilfs2/inode.c +++ b/fs/nilfs2/inode.c | |||
@@ -58,7 +58,7 @@ int nilfs_get_block(struct inode *inode, sector_t blkoff, | |||
58 | struct nilfs_inode_info *ii = NILFS_I(inode); | 58 | struct nilfs_inode_info *ii = NILFS_I(inode); |
59 | __u64 blknum = 0; | 59 | __u64 blknum = 0; |
60 | int err = 0, ret; | 60 | int err = 0, ret; |
61 | struct inode *dat = nilfs_dat_inode(NILFS_I_NILFS(inode)); | 61 | struct inode *dat = NILFS_I_NILFS(inode)->ns_dat; |
62 | unsigned maxblocks = bh_result->b_size >> inode->i_blkbits; | 62 | unsigned maxblocks = bh_result->b_size >> inode->i_blkbits; |
63 | 63 | ||
64 | down_read(&NILFS_MDT(dat)->mi_sem); | 64 | down_read(&NILFS_MDT(dat)->mi_sem); |
@@ -420,13 +420,12 @@ static int __nilfs_read_inode(struct super_block *sb, | |||
420 | struct nilfs_root *root, unsigned long ino, | 420 | struct nilfs_root *root, unsigned long ino, |
421 | struct inode *inode) | 421 | struct inode *inode) |
422 | { | 422 | { |
423 | struct nilfs_sb_info *sbi = NILFS_SB(sb); | 423 | struct the_nilfs *nilfs = NILFS_SB(sb)->s_nilfs; |
424 | struct inode *dat = nilfs_dat_inode(sbi->s_nilfs); | ||
425 | struct buffer_head *bh; | 424 | struct buffer_head *bh; |
426 | struct nilfs_inode *raw_inode; | 425 | struct nilfs_inode *raw_inode; |
427 | int err; | 426 | int err; |
428 | 427 | ||
429 | down_read(&NILFS_MDT(dat)->mi_sem); /* XXX */ | 428 | down_read(&NILFS_MDT(nilfs->ns_dat)->mi_sem); |
430 | err = nilfs_ifile_get_inode_block(root->ifile, ino, &bh); | 429 | err = nilfs_ifile_get_inode_block(root->ifile, ino, &bh); |
431 | if (unlikely(err)) | 430 | if (unlikely(err)) |
432 | goto bad_inode; | 431 | goto bad_inode; |
@@ -456,7 +455,7 @@ static int __nilfs_read_inode(struct super_block *sb, | |||
456 | } | 455 | } |
457 | nilfs_ifile_unmap_inode(root->ifile, ino, bh); | 456 | nilfs_ifile_unmap_inode(root->ifile, ino, bh); |
458 | brelse(bh); | 457 | brelse(bh); |
459 | up_read(&NILFS_MDT(dat)->mi_sem); /* XXX */ | 458 | up_read(&NILFS_MDT(nilfs->ns_dat)->mi_sem); |
460 | nilfs_set_inode_flags(inode); | 459 | nilfs_set_inode_flags(inode); |
461 | return 0; | 460 | return 0; |
462 | 461 | ||
@@ -465,7 +464,7 @@ static int __nilfs_read_inode(struct super_block *sb, | |||
465 | brelse(bh); | 464 | brelse(bh); |
466 | 465 | ||
467 | bad_inode: | 466 | bad_inode: |
468 | up_read(&NILFS_MDT(dat)->mi_sem); /* XXX */ | 467 | up_read(&NILFS_MDT(nilfs->ns_dat)->mi_sem); |
469 | return err; | 468 | return err; |
470 | } | 469 | } |
471 | 470 | ||