mirror of https://gitee.com/openkylin/linux.git
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: Jan Kara <jack@suse.cz> Signed-off-by: Ira Weiny <ira.weiny@intel.com> Link: https://lore.kernel.org/r/20200528150003.828793-2-ira.weiny@intel.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This commit is contained in:
parent
2c567af418
commit
ff694ab60c
|
@ -393,9 +393,9 @@ static int ext4_ioctl_setflags(struct inode *inode,
|
|||
if ((jflag ^ oldflags) & (EXT4_JOURNAL_DATA_FL)) {
|
||||
/*
|
||||
* 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;
|
||||
goto flags_out;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue