From afc3914943eb95ae4631e2e537520232a3f5bf0a Mon Sep 17 00:00:00 2001 From: Trond Myklebust Date: Sun, 5 Oct 2008 14:26:11 -0400 Subject: [PATCH] --- yaml --- r: 115384 b: refs/heads/master c: 2f28ea614ff497202d5a52af82da523ae4a20718 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/nfs/inode.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index dc707846dbfb..2e1c5ae2abe7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 076f1fc94c44be2664172c63b4a2b51ae2d265ea +refs/heads/master: 2f28ea614ff497202d5a52af82da523ae4a20718 diff --git a/trunk/fs/nfs/inode.c b/trunk/fs/nfs/inode.c index a2f54154d825..f3b8ed904df7 100644 --- a/trunk/fs/nfs/inode.c +++ b/trunk/fs/nfs/inode.c @@ -453,6 +453,7 @@ static int nfs_vmtruncate(struct inode * inode, loff_t offset) void nfs_setattr_update_inode(struct inode *inode, struct iattr *attr) { if ((attr->ia_valid & (ATTR_MODE|ATTR_UID|ATTR_GID)) != 0) { + spin_lock(&inode->i_lock); if ((attr->ia_valid & ATTR_MODE) != 0) { int mode = attr->ia_mode & S_IALLUGO; mode |= inode->i_mode & ~S_IALLUGO; @@ -462,7 +463,6 @@ void nfs_setattr_update_inode(struct inode *inode, struct iattr *attr) inode->i_uid = attr->ia_uid; if ((attr->ia_valid & ATTR_GID) != 0) inode->i_gid = attr->ia_gid; - spin_lock(&inode->i_lock); NFS_I(inode)->cache_validity |= NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ACL; spin_unlock(&inode->i_lock); }