Commit 839a534f authored by Chen Li's avatar Chen Li Committed by Namjae Jeon
Browse files

exfat: avoid incorrectly releasing for root inode



In d_make_root, when we fail to allocate dentry for root inode,
we will iput root inode and returned value is NULL in this function.

So we do not need to release this inode again at d_make_root's caller.

Signed-off-by: default avatarChen Li <chenli@uniontech.com>
Signed-off-by: default avatarNamjae Jeon <namjae.jeon@samsung.com>
parent 62fb9874
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -690,7 +690,7 @@ static int exfat_fill_super(struct super_block *sb, struct fs_context *fc)
	if (!sb->s_root) {
		exfat_err(sb, "failed to get the root dentry");
		err = -ENOMEM;
		goto put_inode;
		goto free_table;
	}

	return 0;