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);