]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
exfat: support dynamic allocate bh for exfat_entry_set_cache
authorYuezhang Mo <Yuezhang.Mo@sony.com>
Wed, 9 Nov 2022 05:50:22 +0000 (13:50 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Dec 2024 17:08:51 +0000 (18:08 +0100)
commitd8fe01ad2d8ab33aaf8f2efad9e8f1dae11c4b0c
tree5fb3f9a21488845b2c041b5992adca249ffa849f
parent755fe68cd4b59e1d2a2dd3286177fd4404f57fed
exfat: support dynamic allocate bh for exfat_entry_set_cache

commit a3ff29a95fde16906304455aa8c0bd84eb770258 upstream.

In special cases, a file or a directory may occupied more than 19
directory entries, pre-allocating 3 bh is not enough. Such as
  - Support vendor secondary directory entry in the future.
  - Since file directory entry is damaged, the SecondaryCount
    field is bigger than 18.

So this commit supports dynamic allocation of bh.

Signed-off-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
Reviewed-by: Andy Wu <Andy.Wu@sony.com>
Reviewed-by: Aoyama Wataru <wataru.aoyama@sony.com>
Reviewed-by: Sungjong Seo <sj1557.seo@samsung.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/exfat/dir.c
fs/exfat/exfat_fs.h