diff options
| author | zhoumin <teczm@foxmail.com> | 2026-10-12 21:20:06 +0800 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2026-10-20 22:29:54 -0700 |
| commit | edb528227f55e7564febcf68ed2f1bf8045559a9 (patch) | |
| tree | 4db4f01d2046ba34553ec3d0f42d010e1f7be356 /include | |
| parent | e60b8f7a1d050d5400684f270faf773a1b27e085 (diff) | |
fat: roll back the new entry when create/mkdir fails to build the inode
vfat_create(), vfat_mkdir(), msdos_create() and msdos_mkdir() add the
on-disk entry before calling fat_build_inode() to set up the VFS inode.
If fat_build_inode() fails, the error is returned but the entry stays on
disk and the file or directory shows up after remount.
Remove the entry in that case. For mkdir, also free the directory cluster
and decrement the parent's link count.
[akpm@linux-foundation.org" export _fat_msg() to modules]
Link: https://lore.kernel.org/tencent_4EDD66523CED299DB0C99498B4D8C939A009@qq.com
Signed-off-by: zhoumin <teczm@foxmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
