From patchwork Mon Jan 21 15:23:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 10773969 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 94AB5746 for ; Mon, 21 Jan 2019 15:23:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 813AA2A564 for ; Mon, 21 Jan 2019 15:23:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 754942A583; Mon, 21 Jan 2019 15:23:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0F9D92A5A7 for ; Mon, 21 Jan 2019 15:23:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730065AbfAUPXe (ORCPT ); Mon, 21 Jan 2019 10:23:34 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:58698 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730044AbfAUPXe (ORCPT ); Mon, 21 Jan 2019 10:23:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From :Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=6qFtGcMZleCOHUcue+PXSJBon9kcRiR0CaDmtfwTzUc=; b=HD90eezh9T62+A1baf+1tw5V3p CiwqI3cVQahEhUkSOSENj4YiVwooizC7vzqQ6DTQljEHo5L24dvvSyQ5G5z+vJCjpINLRlmW//Ipp fluNW8lKcv2IsBSNie0XJGSXBI0hHsP1G/P0NUwacj1fLM2WPW0vjP1YkNuwF82RVXMjt9WsfUMGu uJqvG/LfjkLTnSp0RpooL/EmkA7rzMAg6LOYiCiBNbPn6HUcE2gKGWpNyHOf/m7dTrUsaQblCGYmD Af8rxWWOoBOidX5Yq8MQ00S1ZL2aTI2VLtiQ3sRZuFxbkS0xlPGqwRva5rBG6bGSaehPpxnzAmTUM Gutog5VQ==; Received: from 089144210168.atnat0019.highway.a1.net ([89.144.210.168] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1glbQB-00085W-L1; Mon, 21 Jan 2019 15:23:32 +0000 From: Christoph Hellwig To: Al Viro Cc: David Howells , Mike Marshall , Martin Brandenburg , linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org, devel@lists.orangefs.org Subject: [PATCH 1/2] orangefs: don't reinitialize result_mask in ->getattr Date: Mon, 21 Jan 2019 16:23:25 +0100 Message-Id: <20190121152326.9954-2-hch@lst.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190121152326.9954-1-hch@lst.de> References: <20190121152326.9954-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The caller already initializes it to the basic stats. Just clear not supported default bits where needed. Signed-off-by: Christoph Hellwig --- fs/orangefs/inode.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/fs/orangefs/inode.c b/fs/orangefs/inode.c index f038235c64bd..c3334eca18c7 100644 --- a/fs/orangefs/inode.c +++ b/fs/orangefs/inode.c @@ -261,11 +261,8 @@ int orangefs_getattr(const struct path *path, struct kstat *stat, generic_fillattr(inode, stat); /* override block size reported to stat */ - if (request_mask & STATX_SIZE) - stat->result_mask = STATX_BASIC_STATS; - else - stat->result_mask = STATX_BASIC_STATS & - ~STATX_SIZE; + if (!(request_mask & STATX_SIZE)) + stat->result_mask &= ~STATX_SIZE; stat->attributes_mask = STATX_ATTR_IMMUTABLE | STATX_ATTR_APPEND;