From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: zhoumin <teczm@foxmail.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] fat: roll back the new entry when create/mkdir fails to build the inode
Date: Wed, 14 Oct 2026 13:03:22 +0900 [thread overview]
Message-ID: <878q41lyid.fsf@mail.parknet.co.jp> (raw)
In-Reply-To: <20261013155415.89ca96f42093ca7434b9ed2c@linux-foundation.org>
Andrew Morton <akpm@linux-foundation.org> writes:
> 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?
Ouch. Thank you. fat_msg() was not used in msdos.ko or vfat.ko until now
(only in fat.ko). So your patch is right.
> 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 */
> _
>
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
prev parent reply other threads:[~2026-10-14 4:03 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
2026-10-14 4:03 ` OGAWA Hirofumi [this message]
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=878q41lyid.fsf@mail.parknet.co.jp \
--to=hirofumi@mail.parknet.co.jp \
--cc=akpm@linux-foundation.org \
--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®