fs: fat: allocate a new cluster for root directory of fat32
authorAKASHI Takahiro <takahiro.akashi@linaro.org>
Fri, 24 May 2019 05:10:37 +0000 (14:10 +0900)
committerTom Rini <trini@konsulko.com>
Tue, 28 May 2019 22:55:09 +0000 (18:55 -0400)
commitcd2d727fff7ea4c69db49d7ee63bd791f91acd26
treeb80d0b18fd4792b684c0b7bbef4cd0e3611475c6
parent9c709c7b4177d063733070c7256f0b8635996d65
fs: fat: allocate a new cluster for root directory of fat32

Contrary to fat12/16, fat32 can have root directory at any location
and its size can be expanded.
Without this patch, root directory won't grow properly and so we will
eventually fail to add files under root directory. Please note that this
can happen even if you delete many files as deleted directory entries
are not reclaimed but just marked as "deleted" under the current
implementation.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Tested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
fs/fat/fat_write.c