[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aPuAXaHNWMhZOeuv@codewreck.org>
Date: Fri, 24 Oct 2025 22:34:21 +0900
From: Dominique Martinet <asmadeus@...ewreck.org>
To: Christian Schoenebeck <linux_oss@...debyte.com>
Cc: Eric Van Hensbergen <ericvh@...nel.org>,
Dan Carpenter <dan.carpenter@...aro.org>,
Latchesar Ionkov <lucho@...kov.net>, v9fs@...ts.linux.dev,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] fs/9p: delete unnnecessary condition
Christian Schoenebeck wrote on Fri, Oct 24, 2025 at 01:59:46PM +0200:
> On Friday, October 24, 2025 1:26:00 PM CEST Dan Carpenter wrote:
> > We already know that "retval" is negative, so there is no need to check
> > again. Also the statement is not indented far enough. Delete it.
> >
> > Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>
> > ---
>
> Fixes: 43c36a5
> Reviewed-by: Christian Schoenebeck <linux_oss@...debyte.com>
>
> Apparently a manual revert copy paste error. The rest of the revert commit
> LGTM.
Ah, I left that part of the reverted hunk while keeping the HEAD part:
```
<<<<<<< HEAD
}
if (v9inode->cache_validity & V9FS_INO_INVALID_ATTR) {
p9_debug(P9_DEBUG_VFS, "dentry: %pd (%p) invalidated due to type change\n",
dentry, dentry);
return 0;
}
if (retval < 0) {
p9_debug(P9_DEBUG_VFS,
"refresh inode: dentry = %pd (%p), got error %pe\n",
dentry, dentry, ERR_PTR(retval));
||||||| 290434474c33 (fs/9p: Refresh metadata in d_revalidate for uncached mode too)
if (!cached && v9inode->cache_validity & V9FS_INO_INVALID_ATTR)
return 0;
if (retval < 0)
=======
if (retval < 0)
>>>>>>> parent of 290434474c33 (fs/9p: Refresh metadata in d_revalidate for uncached mode too)
return retval;
```
For a proper revert I should have removed the first `if
(v9inode->cache_validity & V9FS_INO_INVALID_ATTR)` too :/
OTOH it still makes sense even without the rest of the patch (the only
reason V9FS_INO_INVALID_ATTR would still be set is on type change, and
in that case we do want to return 0 even on refresh inode error)
Anyway, thanksfully this particular double retval < 0 check is harmless
-- I'll pick this up for -next for now but hopefully we'll be able to
"revert the revert" and fix the other problems Tingmao pointed out by
the time we reach the 6.19 merge window...
Thank you both!
--
Dominique Martinet | Asmadeus
Powered by blists - more mailing lists