[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1546854790-5233-1-git-send-email-suyj.fnst@cn.fujitsu.com>
Date: Mon, 7 Jan 2019 04:53:10 -0500
From: Su Yanjun <suyj.fnst@...fujitsu.com>
To: <darrick.wong@...cle.com>
CC: <linux-xfs@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<suyj.fnst@...fujitsu.com>, <suyanjun218@...il.com>
Subject: [PATCH] xfs: correct statx's result_mask value
For statx syscall, xfs return the wrong result_mask.
Signed-off-by: Su Yanjun <suyj.fnst@...fujitsu.com>
---
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
Powered by blists - more mailing lists