summaryrefslogtreecommitdiff
path: root/fs/ext4
diff options
context:
space:
mode:
authorIra Weiny <ira.weiny@intel.com>2020-05-28 07:59:55 -0700
committerTheodore Ts'o <tytso@mit.edu>2020-05-28 22:09:46 -0400
commitff694ab60c29cfeba81b3d5068d3c908f22110ed (patch)
treea0e65ca2f414496337ade702cfbf813e86838602 /fs/ext4
parent2c567af418e3f9380c2051aada58b4e5a4b5c2ad (diff)
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>
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/ioctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c
index bfc1281fc4cb..5813e5e73eab 100644
--- a/fs/ext4/ioctl.c
+++ b/fs/ext4/ioctl.c
@@ -393,9 +393,9 @@ flags_err:
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;
}