diff options
author | Chen Li <chenli@uniontech.com> | 2021-06-09 06:48:55 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-03-28 10:57:07 +0300 |
commit | 9eeaa2d7d58ae7fe66bdb016a03fe251c48fe222 (patch) | |
tree | 206e8b17197b15c41e6ae7550e156c4947b0c30f /fs/exfat | |
parent | ae8ec5eabb1a0e672e054ef50374f3d8508d6828 (diff) | |
download | linux-9eeaa2d7d58ae7fe66bdb016a03fe251c48fe222.tar.xz |
exfat: avoid incorrectly releasing for root inode
commit 839a534f1e853f1aec100d06040c0037b89c2dc3 upstream.
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>
Cc: Tadeusz Struk <tadeusz.struk@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/exfat')
-rw-r--r-- | fs/exfat/super.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/exfat/super.c b/fs/exfat/super.c index cd04c912f02e..ba70ed1c9804 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; |