ANDROID: Incremental fs: Fix pseudo-file attributes

Prior change

ANDROID: Incremental fs: stat should return actual used blocks

adds blocks to getattr. Unfortunately the code always looks for the
backing file, and pseudo files don't have backing files, so getattr
fails for pseudo files.

Bug: 186567511
Test: incfs_test passes, can do incremental installs on test device
Signed-off-by: Paul Lawrence <paullawrence@google.com>
Change-Id: Ia3df87f3683e095d05c822b69747515963c95f1c
This commit is contained in:
Paul Lawrence
2021-04-27 13:55:47 -07:00
parent fef6bc00f5
commit 9d00e67d8b
+3
View File
@@ -1631,6 +1631,9 @@ static int incfs_getattr(struct user_namespace *ns, const struct path *path,
generic_fillattr(ns, inode, stat);
if (inode->i_ino < INCFS_START_INO_RANGE)
return 0;
stat->attributes &= ~STATX_ATTR_VERITY;
if (IS_VERITY(inode))
stat->attributes |= STATX_ATTR_VERITY;