Skip to content

Commit 6e45a30

Browse files
committed
fs/9p: remove erroneous nlink init from legacy stat2inode
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 <[email protected]>
1 parent 7a84602 commit 6e45a30

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

fs/9p/vfs_inode.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,8 +1064,6 @@ v9fs_stat2inode(struct p9_wstat *stat, struct inode *inode,
10641064
struct v9fs_session_info *v9ses = sb->s_fs_info;
10651065
struct v9fs_inode *v9inode = V9FS_I(inode);
10661066

1067-
set_nlink(inode, 1);
1068-
10691067
inode_set_atime(inode, stat->atime, 0);
10701068
inode_set_mtime(inode, stat->mtime, 0);
10711069
inode_set_ctime(inode, stat->mtime, 0);

0 commit comments

Comments
 (0)