Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 27922b4260f65d317aabda37e42bbbff > files > 1135

kernel-2.6.18-238.el5.src.rpm

From: Jeff Layton <jlayton@redhat.com>
Date: Thu, 8 Jul 2010 14:30:14 -0400
Subject: [fs] nfs: i_nlinks changes must set NFS_INO_INVALID_ATTR
Message-id: <1278599414-23803-2-git-send-email-jlayton@redhat.com>
Patchwork-id: 26765
O-Subject: [RHEL5.6 PATCH 8/4] BZ#601800: nfs: Changes to inode->i_nlinks must
	set the NFS_INO_INVALID_ATTR flag
Bugzilla: 601800
RH-Acked-by: Steve Dickson <SteveD@redhat.com>

Subject: nfs: changes to inode->i_nlinks must set NFS_INO_INVALID_ATTR flag
From: Trond Myklebust <Trond.Myklebust@netapp.com>

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 68d89c6..cf0a826 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -1084,6 +1084,9 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr)
 	    inode->i_gid != fattr->gid)
 		invalid |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ACL;
 
+	if (inode->i_nlink != fattr->nlink)
+		invalid |= NFS_INO_INVALID_ATTR;
+
 	inode->i_mode = fattr->mode;
 	inode->i_nlink = fattr->nlink;
 	inode->i_uid = fattr->uid;