mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Su Yanjun <suyj.fnst@cn.fujitsu.com>
To: <darrick.wong@oracle.com>
Cc: <linux-xfs@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<suyj.fnst@cn.fujitsu.com>, <suyanjun218@gmail.com>
Subject: [PATCH] xfs: correct statx's result_mask value
Date: Mon, 7 Jan 2019 04:53:10 -0500	[thread overview]
Message-ID: <1546854790-5233-1-git-send-email-suyj.fnst@cn.fujitsu.com> (raw)

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




             reply	other threads:[~2019-01-07  9:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-07  9:53 Su Yanjun [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1546854790-5233-1-git-send-email-suyj.fnst@cn.fujitsu.com \
    --to=suyj.fnst@cn.fujitsu.com \
    --cc=darrick.wong@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=suyanjun218@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®