summaryrefslogtreecommitdiffstats
path: root/fs/ext4/verity.c
diff options
context:
space:
mode:
authorIra Weiny <ira.weiny@intel.com>2020-05-28 16:59:59 +0200
committerTheodore Ts'o <tytso@mit.edu>2020-05-29 04:09:47 +0200
commit043546e46dc70c25ff7e2cf6d09cbb0424fc9978 (patch)
tree0100317f56b4bed631b19134ed7d6323938290e7 /fs/ext4/verity.c
parentfs/ext4: Update ext4_should_use_dax() (diff)
downloadlinux-043546e46dc70c25ff7e2cf6d09cbb0424fc9978.tar.xz
linux-043546e46dc70c25ff7e2cf6d09cbb0424fc9978.zip
fs/ext4: Only change S_DAX on inode load
To prevent complications with in memory inodes we only set S_DAX on inode load. FS_XFLAG_DAX can be changed at any time and S_DAX will change after inode eviction and reload. Add init bool to ext4_set_inode_flags() to indicate if the inode is being newly initialized. Assert that S_DAX is not set on an inode which is just being loaded. Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Ira Weiny <ira.weiny@intel.com> Link: https://lore.kernel.org/r/20200528150003.828793-6-ira.weiny@intel.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/verity.c')
-rw-r--r--fs/ext4/verity.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/verity.c b/fs/ext4/verity.c
index f05a09fb2ae4..89a155ece323 100644
--- a/fs/ext4/verity.c
+++ b/fs/ext4/verity.c
@@ -244,7 +244,7 @@ static int ext4_end_enable_verity(struct file *filp, const void *desc,
if (err)
goto out_stop;
ext4_set_inode_flag(inode, EXT4_INODE_VERITY);
- ext4_set_inode_flags(inode);
+ ext4_set_inode_flags(inode, false);
err = ext4_mark_iloc_dirty(handle, inode, &iloc);
}
out_stop: