diff options
author | Martin Brandenburg <martin@omnibond.com> | 2018-05-31 16:37:00 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-06-26 07:51:31 +0800 |
commit | 998d7773b9edc12abb5377e00f214ecfed0b1945 (patch) | |
tree | 7f06645cd372362f8446116f2b3ef9c1d34be756 /fs/orangefs | |
parent | 5aeeed5f603bd3555e3e690b1f5387da8dc01f65 (diff) | |
download | linux-stable-998d7773b9edc12abb5377e00f214ecfed0b1945.tar.gz linux-stable-998d7773b9edc12abb5377e00f214ecfed0b1945.tar.bz2 linux-stable-998d7773b9edc12abb5377e00f214ecfed0b1945.zip |
orangefs: report attributes_mask and attributes for statx
commit 7f54910fa8dfe504f2e1563f4f6ddc3294dfbf3a upstream.
OrangeFS formerly failed to set attributes_mask with the result that
software could not see immutable and append flags present in the
filesystem.
Reported-by: Becky Ligon <ligon@clemson.edu>
Signed-off-by: Martin Brandenburg <martin@omnibond.com>
Fixes: 68a24a6cc4a6 ("orangefs: implement statx")
Cc: stable@vger.kernel.org
Cc: hubcap@omnibond.com
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/orangefs')
-rw-r--r-- | fs/orangefs/inode.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/orangefs/inode.c b/fs/orangefs/inode.c index 79c61da8b1bc..c65a51d87cac 100644 --- a/fs/orangefs/inode.c +++ b/fs/orangefs/inode.c @@ -269,6 +269,13 @@ int orangefs_getattr(const struct path *path, struct kstat *stat, else stat->result_mask = STATX_BASIC_STATS & ~STATX_SIZE; + + stat->attributes_mask = STATX_ATTR_IMMUTABLE | + STATX_ATTR_APPEND; + if (inode->i_flags & S_IMMUTABLE) + stat->attributes |= STATX_ATTR_IMMUTABLE; + if (inode->i_flags & S_APPEND) + stat->attributes |= STATX_ATTR_APPEND; } return ret; } |