From: Andrew Morton <akpm@linux-foundation.org>
To: zhoumin <teczm@foxmail.com>
Cc: hirofumi@mail.parknet.co.jp, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] fat: roll back the new entry when create/mkdir fails to build the inode
Date: Tue, 13 Oct 2026 15:54:15 -0700 [thread overview]
Message-ID: <20261013155415.89ca96f42093ca7434b9ed2c@linux-foundation.org> (raw)
In-Reply-To: <tencent_4EDD66523CED299DB0C99498B4D8C939A009@qq.com>
On Mon, 12 Oct 2026 21:20:06 +0800 zhoumin <teczm@foxmail.com> wrote:
> 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.
MODPOST Module.symvers
ERROR: modpost: fs/fat/msdos.ko: symbol '_fat_msg' undefined!
make[2]: *** [scripts/Makefile.modpost:147: Module.symvers] Error 1
make[1]: *** [/usr/src/25/Makefile:2159: modpost] Error 2
make: *** [Makefile:248: __sub-make] Error 2
**FAILED**
Easy fixup, but I'm surprised this hasn't already been encountered - is
something funny going on?
From: Andrew Morton <akpm@linux-foundation.org>
Subject: fat-roll-back-the-new-entry-when-create-mkdir-fails-to-build-the-inode-fix
Date: Tue Oct 13 03:50:35 PM PDT 2026
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: zhoumin <teczm@foxmail.com>
---
fs/fat/misc.c | 1 +
1 file changed, 1 insertion(+)
--- a/fs/fat/misc.c~fat-roll-back-the-new-entry-when-create-mkdir-fails-to-build-the-inode-fix
+++ a/fs/fat/misc.c
@@ -62,6 +62,7 @@ void _fat_msg(struct super_block *sb, co
_printk(FAT_PRINTK_PREFIX "%pV\n", level, sb->s_id, &vaf);
va_end(args);
}
+EXPORT_SYMBOL_GPL(_fat_msg);
/* Flushes the number of free clusters on FAT32 */
/* XXX: Need to write one per FSINFO block. Currently only writes 1 */
_
next prev parent reply other threads:[~2026-10-13 22:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-12 6:43 [PATCH] " zhoumin
2026-10-12 9:24 ` OGAWA Hirofumi
2026-10-12 13:20 ` [PATCH v2] " zhoumin
2026-10-13 12:16 ` OGAWA Hirofumi
2026-10-13 22:54 ` Andrew Morton [this message]
2026-10-14 4:03 ` OGAWA Hirofumi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261013155415.89ca96f42093ca7434b9ed2c@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=hirofumi@mail.parknet.co.jp \
--cc=linux-kernel@vger.kernel.org \
--cc=teczm@foxmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®