Skip to content

Commit 7f54910

Browse files
Martin Brandenburghubcapsc
authored andcommitted
orangefs: report attributes_mask and attributes for statx
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 <[email protected]> Signed-off-by: Martin Brandenburg <[email protected]> Fixes: 68a24a6 ("orangefs: implement statx") Cc: [email protected] Cc: [email protected] Signed-off-by: Mike Marshall <[email protected]>
1 parent ec62e95 commit 7f54910

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

fs/orangefs/inode.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,13 @@ int orangefs_getattr(const struct path *path, struct kstat *stat,
268268
else
269269
stat->result_mask = STATX_BASIC_STATS &
270270
~STATX_SIZE;
271+
272+
stat->attributes_mask = STATX_ATTR_IMMUTABLE |
273+
STATX_ATTR_APPEND;
274+
if (inode->i_flags & S_IMMUTABLE)
275+
stat->attributes |= STATX_ATTR_IMMUTABLE;
276+
if (inode->i_flags & S_APPEND)
277+
stat->attributes |= STATX_ATTR_APPEND;
271278
}
272279
return ret;
273280
}

0 commit comments

Comments
 (0)