diff options
author | Christoph Hellwig <hch@lst.de> | 2019-01-21 16:23:25 +0100 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2019-02-01 07:55:45 +0100 |
commit | 5678b5d6a8ec433936ccb9e0626e6361e241c275 (patch) | |
tree | 058df16be62bf481ef59e20fcbbf6a2b358400b0 /fs/orangefs | |
parent | fs/devpts: always delete dcache dentry-s in dput() (diff) | |
download | linux-5678b5d6a8ec433936ccb9e0626e6361e241c275.tar.xz linux-5678b5d6a8ec433936ccb9e0626e6361e241c275.zip |
orangefs: don't reinitialize result_mask in ->getattr
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>
Diffstat (limited to 'fs/orangefs')
-rw-r--r-- | fs/orangefs/inode.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/orangefs/inode.c b/fs/orangefs/inode.c index f038235c64bd..c3334eca18c7 100644 --- a/fs/orangefs/inode.c +++ b/fs/orangefs/inode.c @@ -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; |