提交 ff694ab6 编写于 作者: I Ira Weiny 提交者: 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: NJan Kara <jack@suse.cz>
Signed-off-by: NIra Weiny <ira.weiny@intel.com>
Link: https://lore.kernel.org/r/20200528150003.828793-2-ira.weiny@intel.comSigned-off-by: NTheodore Ts'o <tytso@mit.edu>
上级 2c567af4
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册