nfs: set security label when revalidating inode
authorJeff Layton <jlayton@redhat.com>
Sat, 2 Nov 2013 10:57:18 +0000 (06:57 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Mon, 4 Nov 2013 21:42:38 +0000 (16:42 -0500)
Currently, we fetch the security label when revalidating an inode's
attributes, but don't apply it. This is in contrast to the readdir()
codepath where we do apply label changes.

Cc: Dave Quigley <dpquigl@davequigley.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/inode.c

index 471ba59..26e77d8 100644 (file)
@@ -923,6 +923,8 @@ __nfs_revalidate_inode(struct nfs_server *server, struct inode *inode)
        if (nfsi->cache_validity & NFS_INO_INVALID_ACL)
                nfs_zap_acl_cache(inode);
 
+       nfs_setsecurity(inode, fattr, label);
+
        dfprintk(PAGECACHE, "NFS: (%s/%Ld) revalidation complete\n",
                inode->i_sb->s_id,
                (long long)NFS_FILEID(inode));