Skip to content

Commit

Permalink
orangefs: report attributes_mask and attributes for statx
Browse files Browse the repository at this point in the history
commit 7f54910 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: 68a24a6 ("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>
  • Loading branch information
Martin Brandenburg authored and Greg Kroah-Hartman committed Jun 25, 2018
1 parent 5aeeed5 commit 998d777
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions fs/orangefs/inode.c
Original file line number Diff line number Diff line change
@@ -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;
}

0 comments on commit 998d777

Please sign in to comment.