From patchwork Sat Nov 2 10:57:18 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 3130091 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8342CBEEB2 for ; Sat, 2 Nov 2013 10:57:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8C57920451 for ; Sat, 2 Nov 2013 10:57:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A219020444 for ; Sat, 2 Nov 2013 10:57:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751852Ab3KBK5Y (ORCPT ); Sat, 2 Nov 2013 06:57:24 -0400 Received: from mail-qa0-f45.google.com ([209.85.216.45]:39275 "EHLO mail-qa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751847Ab3KBK5Y (ORCPT ); Sat, 2 Nov 2013 06:57:24 -0400 Received: by mail-qa0-f45.google.com with SMTP id ii20so1159914qab.11 for ; Sat, 02 Nov 2013 03:57:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=D8kuTW/qkOCBot7VlaXCrHx1mnhFBe/ocgox8eZxH24=; b=VpBXnW5rzxfmWKeWoxTCAzi6FFAN3hWTd/B+YH0aCIgt3dvB6jNrIAV96cLgKPLt+J p4qXRpX29gRV8ps5t23cmCAwIN5lB08OSSXiEg/UjICjV+FlBxLWtYztKogvXQjp9L8B HblldQtJx2H85kQMQYd1UFpnB7jweewaM2FSslAv22ajyuWAWfuqAy3yjV3/A0uol9YW 6aRjyfgomBWbGJ23c+ZS8GSJbGDMFoE6vES3uievZeisqBw+l031HBltwJANtTzqUMD3 Iw5o3g/VlLhER37DRWFG80TdCqCPDuq97IIzowbW5mF89L/bacM0BZ5ksfPuB1MfeB78 4q2w== X-Gm-Message-State: ALoCoQnkZhDmGhKFHZW5qNw/9hSvds+PirfcGiKd4NWdIhwcNKutP7kftQS34Hj9caY4u5BQD8jn X-Received: by 10.224.64.73 with SMTP id d9mr9664718qai.83.1383389843252; Sat, 02 Nov 2013 03:57:23 -0700 (PDT) Received: from salusa.poochiereds.net (cpe-107-015-124-230.nc.res.rr.com. [107.15.124.230]) by mx.google.com with ESMTPSA id og1sm26772269qeb.3.2013.11.02.03.57.22 for (version=TLSv1.2 cipher=AES128-GCM-SHA256 bits=128/128); Sat, 02 Nov 2013 03:57:22 -0700 (PDT) From: Jeff Layton To: trond.myklebust@netapp.com Cc: linux-nfs@vger.kernel.org, dpquigl@davequigley.com Subject: [PATCH] nfs: set security label when revalidating inode Date: Sat, 2 Nov 2013 06:57:18 -0400 Message-Id: <1383389838-1858-1-git-send-email-jlayton@redhat.com> X-Mailer: git-send-email 1.8.3.1 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Signed-off-by: Jeff Layton --- fs/nfs/inode.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 4bc7538..6ae6160 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c @@ -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));