Skip to content

Commit e3e6bd6

Browse files
Martin Brandenburggregkh
authored andcommitted
orangefs: report attributes_mask and attributes for statx
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 <[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]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent f7e4328 commit e3e6bd6

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
@@ -269,6 +269,13 @@ int orangefs_getattr(const struct path *path, struct kstat *stat,
269269
else
270270
stat->result_mask = STATX_BASIC_STATS &
271271
~STATX_SIZE;
272+
273+
stat->attributes_mask = STATX_ATTR_IMMUTABLE |
274+
STATX_ATTR_APPEND;
275+
if (inode->i_flags & S_IMMUTABLE)
276+
stat->attributes |= STATX_ATTR_IMMUTABLE;
277+
if (inode->i_flags & S_APPEND)
278+
stat->attributes |= STATX_ATTR_APPEND;
272279
}
273280
return ret;
274281
}

0 commit comments

Comments
 (0)