nilfs2: fix leak of shadow dat inode in error path of load_nilfs
If load_nilfs() gets an error while doing recovery, it will fail to free the shadow inode of dat (nilfs->ns_gc_dat). This fixes the leak issue. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
This commit is contained in:
parent
2bfc96a127
commit
4afc31345e
|
@ -446,6 +446,7 @@ int load_nilfs(struct the_nilfs *nilfs, struct nilfs_sb_info *sbi)
|
||||||
nilfs_mdt_destroy(nilfs->ns_cpfile);
|
nilfs_mdt_destroy(nilfs->ns_cpfile);
|
||||||
nilfs_mdt_destroy(nilfs->ns_sufile);
|
nilfs_mdt_destroy(nilfs->ns_sufile);
|
||||||
nilfs_mdt_destroy(nilfs->ns_dat);
|
nilfs_mdt_destroy(nilfs->ns_dat);
|
||||||
|
nilfs_mdt_destroy(nilfs->ns_gc_dat);
|
||||||
|
|
||||||
failed:
|
failed:
|
||||||
nilfs_clear_recovery_info(&ri);
|
nilfs_clear_recovery_info(&ri);
|
||||||
|
|
Loading…
Reference in New Issue