From 593ee860aa0d804f8eb2a84094bbaee05f6b0250 Mon Sep 17 00:00:00 2001 From: Trond Myklebust Date: Wed, 3 Feb 2010 08:27:35 -0500 Subject: [PATCH] --- yaml --- r: 180241 b: refs/heads/master c: 9b4b351346b41d923d69adec865814fdaac4dba9 h: refs/heads/master i: 180239: 294e04ab1138e216423a9d8d6bd66d76f06dad5b v: v3 --- [refs] | 2 +- trunk/fs/nfs/inode.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index ec16fbf9b465..28226a9892a1 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 387c149b54b4321cbc790dadbd4f8eedb5a90468 +refs/heads/master: 9b4b351346b41d923d69adec865814fdaac4dba9 diff --git a/trunk/fs/nfs/inode.c b/trunk/fs/nfs/inode.c index faa091865ad0..f141bde7756a 100644 --- a/trunk/fs/nfs/inode.c +++ b/trunk/fs/nfs/inode.c @@ -1261,8 +1261,10 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr) if (fattr->valid & NFS_ATTR_FATTR_MODE) { if ((inode->i_mode & S_IALLUGO) != (fattr->mode & S_IALLUGO)) { + umode_t newmode = inode->i_mode & S_IFMT; + newmode |= fattr->mode & S_IALLUGO; + inode->i_mode = newmode; invalid |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ACL; - inode->i_mode = fattr->mode; } } else if (server->caps & NFS_CAP_MODE) invalid |= save_cache_validity & (NFS_INO_INVALID_ATTR