[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240423110118.1652940-9-sashal@kernel.org>
Date: Tue, 23 Apr 2024 07:01:05 -0400
From: Sasha Levin <sashal@...nel.org>
To: linux-kernel@...r.kernel.org,
stable@...r.kernel.org
Cc: Eric Van Hensbergen <ericvh@...nel.org>,
Sasha Levin <sashal@...nel.org>,
lucho@...kov.net,
asmadeus@...ewreck.org,
v9fs@...ts.linux.dev
Subject: [PATCH AUTOSEL 6.8 09/18] fs/9p: remove erroneous nlink init from legacy stat2inode
From: Eric Van Hensbergen <ericvh@...nel.org>
[ Upstream commit 6e45a30fe5e7cf5d42ac07262a3d97644f23dc68 ]
In 9p2000 legacy mode, stat2inode initializes nlink to 1,
which is redundant with what alloc_inode should have already set.
9p2000.u overrides this with extensions if present in the stat
structure, and 9p2000.L incorporates nlink into its stat structure.
At the very least this probably messes with directory nlink
accounting in legacy mode.
Signed-off-by: Eric Van Hensbergen <ericvh@...nel.org>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
fs/9p/vfs_inode.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
index ffb76ec3cd9b3..fa185e50d0fd3 100644
--- a/fs/9p/vfs_inode.c
+++ b/fs/9p/vfs_inode.c
@@ -1148,8 +1148,6 @@ v9fs_stat2inode(struct p9_wstat *stat, struct inode *inode,
struct v9fs_session_info *v9ses = sb->s_fs_info;
struct v9fs_inode *v9inode = V9FS_I(inode);
- set_nlink(inode, 1);
-
inode_set_atime(inode, stat->atime, 0);
inode_set_mtime(inode, stat->mtime, 0);
inode_set_ctime(inode, stat->mtime, 0);
--
2.43.0
Powered by blists - more mailing lists