fs: add generic helper for filling statx attribute flags
[linux-block.git] / fs / orangefs / inode.c
index 16ac617df7d7fdf2ad224b27b3eeb3b5dadf905e..c1bb4c4b5d672803214970542dc492b26b53a804 100644 (file)
@@ -882,12 +882,7 @@ int orangefs_getattr(struct user_namespace *mnt_userns, const struct path *path,
                if (!(request_mask & STATX_SIZE))
                        stat->result_mask &= ~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;
+               generic_fill_statx_attr(inode, stat);
        }
        return ret;
 }