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)
committerNamjae Jeon <linkinjeon@kernel.org>
Mon, 12 Dec 2022 02:02:49 +0000 (11:02 +0900)
commita3ff29a95fde16906304455aa8c0bd84eb770258
tree57350d5839a840354048b8438215f98debad2008
parentf83d8a3b532097276266b5e81073ea46e27b17ab
exfat: support dynamic allocate bh for exfat_entry_set_cache

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>
fs/exfat/dir.c
fs/exfat/exfat_fs.h