Whamcloud - gitweb
LU-16091 enc: S_ENCRYPTED flag on OST objects for enc files
[fs/lustre-release.git] / ldiskfs / kernel_patches / patches / rhel7.9 / ext4-enc-flag.patch
index d24ef32..02e10cd 100644 (file)
@@ -22,13 +22,15 @@ diff -wur a/fs/ext4/xattr.c b/fs/ext4/xattr.c
  
  static int
  ext4_xattr_list_entries(struct dentry *dentry, struct ext4_xattr_entry *entry,
-@@ -1197,14 +1197,19 @@
+@@ -1197,14 +1197,21 @@
                        ext4_handle_sync(handle);
        }
  
 +      if (!error && name_index == EXT4_XATTR_INDEX_ENCRYPTION &&
-+          strcmp(name, "c") == 0)
++          strcmp(name, "c") == 0) {
 +              EXT4_I(inode)->i_flags |= EXT4_ENCRYPT_FL;
++              mark_inode_dirty(inode);
++      }
 +
  cleanup:
        brelse(is.iloc.bh);