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/the_nilfs.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/the_nilfs.c')
-rw-r--r-- | fs/nilfs2/the_nilfs.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/nilfs2/the_nilfs.c b/fs/nilfs2/the_nilfs.c index 95e444319f12..ad4ac607cf57 100644 --- a/fs/nilfs2/the_nilfs.c +++ b/fs/nilfs2/the_nilfs.c | |||
@@ -650,12 +650,11 @@ int nilfs_discard_segments(struct the_nilfs *nilfs, __u64 *segnump, | |||
650 | 650 | ||
651 | int nilfs_count_free_blocks(struct the_nilfs *nilfs, sector_t *nblocks) | 651 | int nilfs_count_free_blocks(struct the_nilfs *nilfs, sector_t *nblocks) |
652 | { | 652 | { |
653 | struct inode *dat = nilfs_dat_inode(nilfs); | ||
654 | unsigned long ncleansegs; | 653 | unsigned long ncleansegs; |
655 | 654 | ||
656 | down_read(&NILFS_MDT(dat)->mi_sem); /* XXX */ | 655 | down_read(&NILFS_MDT(nilfs->ns_dat)->mi_sem); |
657 | ncleansegs = nilfs_sufile_get_ncleansegs(nilfs->ns_sufile); | 656 | ncleansegs = nilfs_sufile_get_ncleansegs(nilfs->ns_sufile); |
658 | up_read(&NILFS_MDT(dat)->mi_sem); /* XXX */ | 657 | up_read(&NILFS_MDT(nilfs->ns_dat)->mi_sem); |
659 | *nblocks = (sector_t)ncleansegs * nilfs->ns_blocks_per_segment; | 658 | *nblocks = (sector_t)ncleansegs * nilfs->ns_blocks_per_segment; |
660 | return 0; | 659 | return 0; |
661 | } | 660 | } |