linux-next/fs/exfat
Yuezhang Mo 70465acbb0 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: 8a3f5711ad ("exfat: reduce FAT chain traversal")
Reported-by: syzbot+6f6c9397e0078ef60bce@syzkaller.appspotmail.com
Tested-by: syzbot+6f6c9397e0078ef60bce@syzkaller.appspotmail.com
Signed-off-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
Reviewed-by: Sungjong Seo <sj1557.seo@samsung.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
2024-12-17 20:21:59 +09:00
..
balloc.c exfat: fix memory leak in exfat_load_bitmap() 2024-09-18 07:40:58 +09:00
cache.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
dir.c exfat: reduce FAT chain traversal 2024-11-25 17:08:27 +09:00
exfat_fs.h exfat: reduce FAT chain traversal 2024-11-25 17:08:27 +09:00
exfat_raw.h exfat: add ioctls for accessing attributes 2023-10-31 10:00:51 +09:00
fatent.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
file.c exfat: fix file being changed by unaligned direct write 2024-11-25 17:08:21 +09:00
inode.c exfat: add exfat_get_dentry_set_by_ei() helper 2024-11-25 17:08:23 +09:00
Kconfig fs: add CONFIG_BUFFER_HEAD 2023-08-02 09:13:09 -06:00
Makefile exfat: add Kconfig and Makefile 2020-03-05 21:00:40 -05:00
misc.c exfat: convert to new timestamp accessors 2023-10-18 13:26:21 +02:00
namei.c exfat: fix exfat_find_empty_entry() not returning error on failure 2024-12-17 20:21:59 +09:00
nls.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
super.c exfat: Implement sops->shutdown and ioctl 2024-09-18 07:40:56 +09:00