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