[PATCH v2] fs/stat: set attributes_mask for STATX_ATTR_DAX

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Xiaoli Feng <fengxiaoli0714@xxxxxxxxx>

keep attributes and attributes_mask are consistent for
STATX_ATTR_DAX.
---
Hi,
Please help to review this patch. I send this patch because xfstests generic/532
is failed for dax test.

 fs/stat.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/fs/stat.c b/fs/stat.c
index dacecdda2e79..4619b3fc9694 100644
--- a/fs/stat.c
+++ b/fs/stat.c
@@ -80,8 +80,10 @@ int vfs_getattr_nosec(const struct path *path, struct kstat *stat,
 	if (IS_AUTOMOUNT(inode))
 		stat->attributes |= STATX_ATTR_AUTOMOUNT;
 
-	if (IS_DAX(inode))
+	if (IS_DAX(inode)) {
 		stat->attributes |= STATX_ATTR_DAX;
+		stat->attributes_mask |= STATX_ATTR_DAX;
+	}
 
 	if (inode->i_op->getattr)
 		return inode->i_op->getattr(path, stat, request_mask,
-- 
2.18.1




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux