diff options
author | Ira Weiny <ira.weiny@intel.com> | 2020-05-28 07:59:59 -0700 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2020-05-28 22:09:47 -0400 |
commit | 043546e46dc70c25ff7e2cf6d09cbb0424fc9978 (patch) | |
tree | 0100317f56b4bed631b19134ed7d6323938290e7 /fs/ext4/ialloc.c | |
parent | a8ab6d3885ef5e2300d683b79a9e1999403eefd9 (diff) | |
download | linux-stable-043546e46dc70c25ff7e2cf6d09cbb0424fc9978.tar.gz linux-stable-043546e46dc70c25ff7e2cf6d09cbb0424fc9978.tar.bz2 linux-stable-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/ialloc.c')
-rw-r--r-- | fs/ext4/ialloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c index 4b8c9a9bdf0c..7941c140723f 100644 --- a/fs/ext4/ialloc.c +++ b/fs/ext4/ialloc.c @@ -1116,7 +1116,7 @@ got: ei->i_block_group = group; ei->i_last_alloc_group = ~0; - ext4_set_inode_flags(inode); + ext4_set_inode_flags(inode, true); if (IS_DIRSYNC(inode)) ext4_handle_sync(handle); if (insert_inode_locked(inode) < 0) { |