summaryrefslogtreecommitdiffstats
path: root/fs/exfat
diff options
context:
space:
mode:
authorChen Li <chenli@uniontech.com>2021-06-09 05:48:55 +0200
committerNamjae Jeon <namjae.jeon@samsung.com>2021-06-28 14:49:47 +0200
commit839a534f1e853f1aec100d06040c0037b89c2dc3 (patch)
tree8dadaffb22406e7dd89662c29055e2e5bbaa11d6 /fs/exfat
parentLinux 5.13 (diff)
downloadlinux-839a534f1e853f1aec100d06040c0037b89c2dc3.tar.xz
linux-839a534f1e853f1aec100d06040c0037b89c2dc3.zip
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 <chenli@uniontech.com> Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Diffstat (limited to 'fs/exfat')
-rw-r--r--fs/exfat/super.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/exfat/super.c b/fs/exfat/super.c
index d38d17a77e76..5539ffc20d16 100644
--- a/fs/exfat/super.c
+++ b/fs/exfat/super.c
@@ -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;