orangefs: don't reinitialize result_mask in ->getattr
authorChristoph Hellwig <hch@lst.de>
Mon, 21 Jan 2019 15:23:25 +0000 (16:23 +0100)
committerAl Viro <viro@zeniv.linux.org.uk>
Fri, 1 Feb 2019 06:55:45 +0000 (01:55 -0500)
The caller already initializes it to the basic stats.  Just
clear not supported default bits where needed.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/orangefs/inode.c

index f038235..c3334ec 100644 (file)
@@ -261,11 +261,8 @@ int orangefs_getattr(const struct path *path, struct kstat *stat,
                generic_fillattr(inode, stat);
 
                /* override block size reported to stat */
-               if (request_mask & STATX_SIZE)
-                       stat->result_mask = STATX_BASIC_STATS;
-               else
-                       stat->result_mask = STATX_BASIC_STATS &
-                           ~STATX_SIZE;
+               if (!(request_mask & STATX_SIZE))
+                       stat->result_mask &= ~STATX_SIZE;
 
                stat->attributes_mask = STATX_ATTR_IMMUTABLE |
                    STATX_ATTR_APPEND;