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>