]> git.baikalelectronics.ru Git - kernel.git/commit
fs/ext4: Only change S_DAX on inode load
authorIra Weiny <ira.weiny@intel.com>
Thu, 28 May 2020 14:59:59 +0000 (07:59 -0700)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 29 May 2020 02:09:47 +0000 (22:09 -0400)
commita8edafd63a47f10edc067acd932c2dd446208a28
tree0100317f56b4bed631b19134ed7d6323938290e7
parentbc51367c5b0d5bc6ef949e5c538cdd2a0da6fd16
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>
fs/ext4/ext4.h
fs/ext4/ialloc.c
fs/ext4/inode.c
fs/ext4/ioctl.c
fs/ext4/super.c
fs/ext4/verity.c