Commit ff694ab6 authored by Ira Weiny's avatar Ira Weiny Committed by Theodore Ts'o

fs/ext4: Narrow scope of DAX check in setflags

When preventing DAX and journaling on an inode.  Use the effective DAX
check rather than the mount option.

This will be required to support per inode DAX flags.
Reviewed-by: default avatarJan Kara <jack@suse.cz>
Signed-off-by: default avatarIra Weiny <ira.weiny@intel.com>
Link: https://lore.kernel.org/r/20200528150003.828793-2-ira.weiny@intel.comSigned-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
parent 2c567af4
...@@ -393,9 +393,9 @@ static int ext4_ioctl_setflags(struct inode *inode, ...@@ -393,9 +393,9 @@ static int ext4_ioctl_setflags(struct inode *inode,
if ((jflag ^ oldflags) & (EXT4_JOURNAL_DATA_FL)) { if ((jflag ^ oldflags) & (EXT4_JOURNAL_DATA_FL)) {
/* /*
* Changes to the journaling mode can cause unsafe changes to * Changes to the journaling mode can cause unsafe changes to
* S_DAX if we are using the DAX mount option. * S_DAX if the inode is DAX
*/ */
if (test_opt(inode->i_sb, DAX)) { if (IS_DAX(inode)) {
err = -EBUSY; err = -EBUSY;
goto flags_out; goto flags_out;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment