staging: erofs: set sb->s_root to NULL when failing from __getname()
Set sb->s_root to NULL when failing from __getname(), so that we can avoid double dput and unnecessary operations in generic_shutdown_super(). Signed-off-by: Chengguang Xu <cgxu519@gmail.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Reviewed-by: Gao Xiang <gaoxiang25@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
083a685c2e
commit
f2dcb8841e
|
@ -457,6 +457,7 @@ static int erofs_read_super(struct super_block *sb,
|
|||
*/
|
||||
err_devname:
|
||||
dput(sb->s_root);
|
||||
sb->s_root = NULL;
|
||||
err_iget:
|
||||
#ifdef EROFS_FS_HAS_MANAGED_CACHE
|
||||
iput(sbi->managed_cache);
|
||||
|
|
Loading…
Reference in New Issue