From 763369f701013e3c5f0a2da760d8fc5170eb5775 Mon Sep 17 00:00:00 2001 From: Chen Li Date: Sat, 10 Jul 2021 20:14:01 +0900 Subject: [PATCH] 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: Chen Li Signed-off-by: Namjae Jeon --- super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/super.c b/super.c index 7d5651decef2..8d0832a56ea0 100644 --- a/super.c +++ b/super.c @@ -984,7 +984,7 @@ static int exfat_fill_super(struct super_block *sb, void *data, int silent) if (!sb->s_root) { exfat_err(sb, "failed to get the root dentry"); err = -ENOMEM; - goto put_inode; + goto free_table; } return 0;