mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
exfat: avoid incorrectly releasing for root inode
commit 839a534f1e 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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
ae8ec5eabb
commit
9eeaa2d7d5
@@ -690,7 +690,7 @@ static int exfat_fill_super(struct super_block *sb, struct fs_context *fc)
|
|||||||
if (!sb->s_root) {
|
if (!sb->s_root) {
|
||||||
exfat_err(sb, "failed to get the root dentry");
|
exfat_err(sb, "failed to get the root dentry");
|
||||||
err = -ENOMEM;
|
err = -ENOMEM;
|
||||||
goto put_inode;
|
goto free_table;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user