diff options
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 | } |