fs: fat: flush a directory cluster properly
authorAKASHI Takahiro <takahiro.akashi@linaro.org>
Fri, 24 May 2019 05:10:36 +0000 (14:10 +0900)
committerTom Rini <trini@konsulko.com>
Tue, 28 May 2019 22:55:08 +0000 (18:55 -0400)
commit9c709c7b4177d063733070c7256f0b8635996d65
treefe97738ca54b3d0d4057ec6978321c3b57a842b6
parenta9f6706cf0ba330281ae7d6a0af65cc26ffb7d25
fs: fat: flush a directory cluster properly

When a long name directory entry is created, multiple directory entries
may be occupied across a directory cluster boundary. Since only one
directory cluster is cached in a directory iterator, a first cluster must
be written back to device before switching over a second cluster.

Without this patch, some added files may be lost even if you don't see
any failures on write operation.

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