X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=fs%2Fnilfs2%2Fsuper.c;h=d0639a6aae9e4a382c03635666ef45b80bb50c65;hb=1f5abe7e7dbcd83e73212c6cb135a6106cea6a0b;hp=2f0e9f7bf152129cf5f1f81f86ba59612009a2f5;hpb=2c2e52fc4fca251e68f90821c9ff5cb18be4df58;p=linux-2.6-omap-h63xx.git diff --git a/fs/nilfs2/super.c b/fs/nilfs2/super.c index 2f0e9f7bf15..d0639a6aae9 100644 --- a/fs/nilfs2/super.c +++ b/fs/nilfs2/super.c @@ -841,8 +841,11 @@ nilfs_fill_super(struct super_block *sb, void *data, int silent, if (sb->s_flags & MS_RDONLY) { if (nilfs_test_opt(sbi, SNAPSHOT)) { - if (!nilfs_cpfile_is_snapshot(nilfs->ns_cpfile, - sbi->s_snapshot_cno)) { + err = nilfs_cpfile_is_snapshot(nilfs->ns_cpfile, + sbi->s_snapshot_cno); + if (err < 0) + goto failed_sbi; + if (!err) { printk(KERN_ERR "NILFS: The specified checkpoint is " "not a snapshot " @@ -1163,7 +1166,6 @@ nilfs_get_sb(struct file_system_type *fs_type, int flags, } else { struct nilfs_sb_info *sbi = NILFS_SB(s); - BUG_ON(!sbi || !sbi->s_nilfs); /* * s_umount protects super_block from unmount process; * It covers pointers of nilfs_sb_info and the_nilfs.