Blame SOURCES/0076-exfat-avoid-incorrectly-releasing-for-root-inode.patch

Kmods SIG 9e3ffb
From 839a534f1e853f1aec100d06040c0037b89c2dc3 Mon Sep 17 00:00:00 2001
Kmods SIG 9e3ffb
From: Chen Li <chenli@uniontech.com>
Kmods SIG 9e3ffb
Date: Wed, 9 Jun 2021 11:48:55 +0800
Kmods SIG 9e3ffb
Subject: [Backport 839a534f1e85] exfat: avoid incorrectly releasing for root
Kmods SIG 9e3ffb
 inode
Kmods SIG 9e3ffb
Kmods SIG 9e3ffb
In d_make_root, when we fail to allocate dentry for root inode,
Kmods SIG 9e3ffb
we will iput root inode and returned value is NULL in this function.
Kmods SIG 9e3ffb
Kmods SIG 9e3ffb
So we do not need to release this inode again at d_make_root's caller.
Kmods SIG 9e3ffb
Kmods SIG 9e3ffb
Signed-off-by: Chen Li <chenli@uniontech.com>
Kmods SIG 9e3ffb
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Kmods SIG 9e3ffb
---
Kmods SIG 9e3ffb
 src/super.c | 2 +-
Kmods SIG 9e3ffb
 1 file changed, 1 insertion(+), 1 deletion(-)
Kmods SIG 9e3ffb
Kmods SIG 9e3ffb
diff --git a/src/super.c b/src/super.c
Kmods SIG 9e3ffb
index d38d17a77e76c45a006abeae532a6ae3170529d7..5539ffc20d16413a8e007aa8b00e8254887be66d 100644
Kmods SIG 9e3ffb
--- a/src/super.c
Kmods SIG 9e3ffb
+++ b/src/super.c
Kmods SIG 9e3ffb
@@ -690,7 +690,7 @@ static int exfat_fill_super(struct super_block *sb, struct fs_context *fc)
Kmods SIG 9e3ffb
 	if (!sb->s_root) {
Kmods SIG 9e3ffb
 		exfat_err(sb, "failed to get the root dentry");
Kmods SIG 9e3ffb
 		err = -ENOMEM;
Kmods SIG 9e3ffb
-		goto put_inode;
Kmods SIG 9e3ffb
+		goto free_table;
Kmods SIG 9e3ffb
 	}
Kmods SIG 9e3ffb
 
Kmods SIG 9e3ffb
 	return 0;
Kmods SIG 9e3ffb
-- 
Kmods SIG 9e3ffb
2.31.1
Kmods SIG 9e3ffb