public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfs: correct statx's result_mask value
@ 2019-01-07  9:53 Su Yanjun
  2019-01-07 17:52 ` Darrick J. Wong
  0 siblings, 1 reply; 8+ messages in thread
From: Su Yanjun @ 2019-01-07  9:53 UTC (permalink / raw)
  To: darrick.wong; +Cc: linux-xfs, linux-kernel, suyj.fnst, suyanjun218

For statx syscall, xfs return the wrong result_mask.

Signed-off-by: Su Yanjun <suyj.fnst@cn.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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-01-08 14:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-07  9:53 [PATCH] xfs: correct statx's result_mask value Su Yanjun
2019-01-07 17:52 ` Darrick J. Wong
2019-01-07 18:02   ` Darrick J. Wong
2019-01-07 18:04   ` Eric Sandeen
2019-01-08  4:58     ` Su Yanjun <suyj.fnst@cn.fujitsu.com>
2019-01-08  5:07       ` Darrick J. Wong
2019-01-08  5:15         ` Su Yanjun <suyj.fnst@cn.fujitsu.com>
2019-01-08 14:11           ` Eric Sandeen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox