summaryrefslogtreecommitdiffstats
path: root/fs/nilfs2/the_nilfs.c
diff options
context:
space:
mode:
authorRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2009-11-19 19:58:46 +0900
committerRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2009-11-20 10:05:52 +0900
commita057d2c01161444c48b12a60351ae6c7135f6e61 (patch)
tree066316a4e9a9d1d2979873c31e7855eb9c093c49 /fs/nilfs2/the_nilfs.c
parentf50a4c8149cc135921a8a0476bff8e622f59aef9 (diff)
downloadtalos-obmc-linux-a057d2c01161444c48b12a60351ae6c7135f6e61.tar.gz
talos-obmc-linux-a057d2c01161444c48b12a60351ae6c7135f6e61.zip
nilfs2: add helper to get if volume is in a valid state
This adds a helper function, nilfs_valid_fs() which returns if nilfs is in a valid state or not. 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.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/nilfs2/the_nilfs.c b/fs/nilfs2/the_nilfs.c
index aea2b58ba03b..890a8d3886cf 100644
--- a/fs/nilfs2/the_nilfs.c
+++ b/fs/nilfs2/the_nilfs.c
@@ -261,16 +261,12 @@ int load_nilfs(struct the_nilfs *nilfs, struct nilfs_sb_info *sbi)
struct nilfs_recovery_info ri;
unsigned int s_flags = sbi->s_super->s_flags;
int really_read_only = bdev_read_only(nilfs->ns_bdev);
- unsigned valid_fs;
+ int valid_fs = nilfs_valid_fs(nilfs);
int err;
if (nilfs_loaded(nilfs))
return 0;
- down_write(&nilfs->ns_sem);
- valid_fs = (nilfs->ns_mount_state & NILFS_VALID_FS);
- up_write(&nilfs->ns_sem);
-
if (!valid_fs) {
printk(KERN_WARNING "NILFS warning: mounting unchecked fs\n");
if (s_flags & MS_RDONLY) {
OpenPOWER on IntegriCloud