Patch "fs/9p: remove erroneous nlink init from legacy stat2inode" has been added to the 6.8-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    fs/9p: remove erroneous nlink init from legacy stat2inode

to the 6.8-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     fs-9p-remove-erroneous-nlink-init-from-legacy-stat2i.patch
and it can be found in the queue-6.8 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit c835fe027499110d728bb1bbc376675781bf4ed3
Author: Eric Van Hensbergen <ericvh@xxxxxxxxxx>
Date:   Tue Apr 9 23:53:00 2024 +0000

    fs/9p: remove erroneous nlink init from legacy stat2inode
    
    [ 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@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
index 7ba7efe47b40d..0fde0ab77eff6 100644
--- a/fs/9p/vfs_inode.c
+++ b/fs/9p/vfs_inode.c
@@ -1152,8 +1152,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);




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux