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 "
} 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.