Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3455381imu; Mon, 7 Jan 2019 03:48:08 -0800 (PST) X-Google-Smtp-Source: ALg8bN6D+8l9anWGQ1lLlzbmObMXSne21UcswXr3KdN9ujIzCYVfx1N6p9qhPtDHS8ZE4FPAnPuJ X-Received: by 2002:a17:902:720c:: with SMTP id ba12mr61102413plb.79.1546861688841; Mon, 07 Jan 2019 03:48:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546861688; cv=none; d=google.com; s=arc-20160816; b=gqJT9vbjQ1/qX1g3YP7XJkOmLDMtfG/zl8xxqM5i0M2dHavJ1mL8ghFgrZImQxPVjc +BsSpap2nzERofy7Y7UAL4C+avjASj/Y1Kwc6+0neWPOLlZawA8U/APds/KWU1sHsE1L o9PqVPGl9b9h73VycPDxkCUX4qTuzup4Jj3zyunJNYNKVjkZwurp26vdkkqsnPqxsbYm CvGfdvJhgzoXlS4k80UZw4lAbEm4j6s0/ErQ1jpCxVQoWPGum4QKiwI2Kjpklfry/Wvk lw9KY1aPxOAQNakb2USaTogaxXlAPfoNcXl+1RUIOozCV2ZcDBOeMUNh6IhlN7IzczwO xakA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=+996fqPQeW1QMy5GzmCfVacPJg+2qBMb7CIXYjdSZqE=; b=bn6zE/uRpVEutAAYTpOGrWo+9ugGJrAY/quSeaFBodx/ybUH+Ukx55GvR+jiRBYMEX yCFzfpCZW8IqIy26LqSVOPE0jbLVt5HUxrTAHR42i+8qh9dw3/YQVNsbLlrw7NxAuz3R wafF7xCTGFvpIj6GU0HpeMXCD+u73jbyaNNmYVdbhmY/UdsZfTdWELBU0LxYtFWUmuSk ENRhT3mNlfqNequybujsQhmg1pkPX4NU4MEtJizQG0g81UYac4htgsM16wcmiCUvQxy6 30pBEsHJWU6F6Px8+zCV4o3jDxSCQBZAoMf3HZRdF3J5xWP3VYrqYHUYZ/Z2yXHeEJdV UUzQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c3si58506802pls.73.2019.01.07.03.47.53; Mon, 07 Jan 2019 03:48:08 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726835AbfAGJxo (ORCPT + 99 others); Mon, 7 Jan 2019 04:53:44 -0500 Received: from mail.cn.fujitsu.com ([183.91.158.132]:8570 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726574AbfAGJxo (ORCPT ); Mon, 7 Jan 2019 04:53:44 -0500 X-IronPort-AV: E=Sophos;i="5.56,450,1539619200"; d="scan'208";a="51466253" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 07 Jan 2019 17:53:26 +0800 Received: from G08CNEXCHPEKD03.g08.fujitsu.local (unknown [10.167.33.85]) by cn.fujitsu.com (Postfix) with ESMTP id 175374B7EC72; Mon, 7 Jan 2019 17:53:22 +0800 (CST) Received: from ubuntu.g08.fujitsu.local (10.167.225.53) by G08CNEXCHPEKD03.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 7 Jan 2019 17:53:24 +0800 From: Su Yanjun To: CC: , , , Subject: [PATCH] xfs: correct statx's result_mask value Date: Mon, 7 Jan 2019 04:53:10 -0500 Message-ID: <1546854790-5233-1-git-send-email-suyj.fnst@cn.fujitsu.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.167.225.53] X-yoursite-MailScanner-ID: 175374B7EC72.AE56C X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: suyj.fnst@cn.fujitsu.com X-Spam-Status: No Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org For statx syscall, xfs return the wrong result_mask. Signed-off-by: Su Yanjun --- fs/xfs/xfs_iops.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c index f48ffd7..3811457 100644 --- a/fs/xfs/xfs_iops.c +++ b/fs/xfs/xfs_iops.c @@ -521,6 +521,9 @@ xfs_vn_getattr( stat->btime.tv_nsec = ip->i_d.di_crtime.t_nsec; } } + + /* Only return mask that we care */ + stat->result_mask &= request_mask; if (ip->i_d.di_flags & XFS_DIFLAG_IMMUTABLE) stat->attributes |= STATX_ATTR_IMMUTABLE; -- 2.7.4