Commit 70465acb authored by Yuezhang Mo's avatar Yuezhang Mo Committed by Namjae Jeon
Browse files

exfat: fix exfat_find_empty_entry() not returning error on failure



On failure, "dentry" is the error code. If the error code indicates
that there is no space, a new cluster may need to be allocated; for
other errors, it should be returned directly.

Only on success, "dentry" is the index of the directory entry, and
it needs to be converted into the directory entry index within the
cluster where it is located.

Fixes: 8a3f5711 ("exfat: reduce FAT chain traversal")
Reported-by: default avatar <syzbot+6f6c9397e0078ef60bce@syzkaller.appspotmail.com>
Tested-by: default avatar <syzbot+6f6c9397e0078ef60bce@syzkaller.appspotmail.com>
Signed-off-by: default avatarYuezhang Mo <Yuezhang.Mo@sony.com>
Reviewed-by: default avatarSungjong Seo <sj1557.seo@samsung.com>
Signed-off-by: default avatarNamjae Jeon <linkinjeon@kernel.org>
parent feffde68
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment