diff options
-rw-r--r-- | fs/ubifs/dir.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/fs/ubifs/dir.c b/fs/ubifs/dir.c index 90a3f01c55d1..417fe0b29f23 100644 --- a/fs/ubifs/dir.c +++ b/fs/ubifs/dir.c | |||
@@ -1644,6 +1644,21 @@ int ubifs_getattr(const struct path *path, struct kstat *stat, | |||
1644 | struct ubifs_inode *ui = ubifs_inode(inode); | 1644 | struct ubifs_inode *ui = ubifs_inode(inode); |
1645 | 1645 | ||
1646 | mutex_lock(&ui->ui_mutex); | 1646 | mutex_lock(&ui->ui_mutex); |
1647 | |||
1648 | if (ui->flags & UBIFS_APPEND_FL) | ||
1649 | stat->attributes |= STATX_ATTR_APPEND; | ||
1650 | if (ui->flags & UBIFS_COMPR_FL) | ||
1651 | stat->attributes |= STATX_ATTR_COMPRESSED; | ||
1652 | if (ui->flags & UBIFS_CRYPT_FL) | ||
1653 | stat->attributes |= STATX_ATTR_ENCRYPTED; | ||
1654 | if (ui->flags & UBIFS_IMMUTABLE_FL) | ||
1655 | stat->attributes |= STATX_ATTR_IMMUTABLE; | ||
1656 | |||
1657 | stat->attributes_mask |= (STATX_ATTR_APPEND | | ||
1658 | STATX_ATTR_COMPRESSED | | ||
1659 | STATX_ATTR_ENCRYPTED | | ||
1660 | STATX_ATTR_IMMUTABLE); | ||
1661 | |||
1647 | generic_fillattr(inode, stat); | 1662 | generic_fillattr(inode, stat); |
1648 | stat->blksize = UBIFS_BLOCK_SIZE; | 1663 | stat->blksize = UBIFS_BLOCK_SIZE; |
1649 | stat->size = ui->ui_size; | 1664 | stat->size = ui->ui_size; |