From: sashiko-bot@kernel.org
To: "Zhang Yi" <yi.zhang@huaweicloud.com>, linux-ext4@vger.kernel.org
Cc: tytso@mit.edu
Subject: Re: [PATCH] ext4: return 0 instead of stale ret in ext4_iomap_writepages()
Date: Fri, 16 Oct 2026 10:09:59 +0000 [thread overview]
Message-ID: <sashiko-outbox-174126@kernel.org> (raw)
In-Reply-To: <20261016095927.1762656-1-yi.zhang@huaweicloud.com>
> From: Zhang Yi <yi.zhang@huawei.com>
>
> smatch reports a "missing error code" warning:
>
> fs/ext4/inode.c:4518 ext4_iomap_writepages() warn: missing error code? 'ret'
>
> The 'ret' variable has already been consumed by the ext4_emergency_state()
> check at the beginning of the function, so its value is always zero at this
> point. Returning it is equivalent to returning 0, but it is misleading
> because it looks like an error code is being propagated.
>
> This branch handles the race with ext4_change_inode_journal_flag(), which
> flushes the dirty data and drops the page cache before switching the inode
> to the buffer_head path, so there is genuinely nothing to write back here.
> Return 0 explicitly to make the intent clear.
>
> Fixes: bdcbb0f19e92 ("ext4: partially enable iomap for the buffered I/O path of regular files")
> Reported-by: kernel test robot <lkp@intel.com>
> Reported-by: Dan Carpenter <error27@gmail.com>
> Closes: https://lore.kernel.org/r/202610160314.PLMEXaOJ-lkp@intel.com/
> Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261016095927.1762656-1-yi.zhang@huaweicloud.com?part=1
prev parent reply other threads:[~2026-10-16 10:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-16 7:58 [tytso-ext4:dev 40/41] fs/ext4/inode.c:4518 ext4_iomap_writepages() warn: missing error code? 'ret' Dan Carpenter
2026-10-16 8:49 ` Zhang Yi
2026-10-16 9:05 ` Dan Carpenter
2026-10-16 9:20 ` Zhang Yi
2026-10-16 9:59 ` [PATCH] ext4: return 0 instead of stale ret in ext4_iomap_writepages() Zhang Yi
2026-10-16 10:09 ` sashiko-bot [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=sashiko-outbox-174126@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=tytso@mit.edu \
--cc=yi.zhang@huaweicloud.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