[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <151996284593.28483.4922911524438696817.stgit@dwillia2-desk3.amr.corp.intel.com>
Date: Thu, 01 Mar 2018 19:54:06 -0800
From: Dan Williams <dan.j.williams@...el.com>
To: linux-nvdimm@...ts.01.org
Cc: Matthew Wilcox <mawilcox@...rosoft.com>,
Ross Zwisler <ross.zwisler@...ux.intel.com>,
stable@...r.kernel.org, Jan Kara <jack@...e.cz>,
linux-xfs@...r.kernel.org, hch@....de,
linux-fsdevel@...r.kernel.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: [PATCH v5 06/12] ext2, dax: replace IS_DAX() with IS_FSDAX()
In preparation for fixing the broken definition of S_DAX in the
CONFIG_FS_DAX=n + CONFIG_DEV_DAX=y case, convert all IS_DAX() usages to
use explicit tests for FSDAX since DAX is ambiguous.
Cc: Matthew Wilcox <mawilcox@...rosoft.com>
Cc: Ross Zwisler <ross.zwisler@...ux.intel.com>
Cc: <stable@...r.kernel.org>
Fixes: dee410792419 ("/dev/dax, core: file operations and dax-mmap")
Reviewed-by: Jan Kara <jack@...e.cz>
Signed-off-by: Dan Williams <dan.j.williams@...el.com>
---
fs/ext2/file.c | 6 +++---
fs/ext2/inode.c | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/fs/ext2/file.c b/fs/ext2/file.c
index 5ac98d074323..702a36df6c01 100644
--- a/fs/ext2/file.c
+++ b/fs/ext2/file.c
@@ -119,7 +119,7 @@ static const struct vm_operations_struct ext2_dax_vm_ops = {
static int ext2_file_mmap(struct file *file, struct vm_area_struct *vma)
{
- if (!IS_DAX(file_inode(file)))
+ if (!IS_FSDAX(file_inode(file)))
return generic_file_mmap(file, vma);
file_accessed(file);
@@ -158,14 +158,14 @@ int ext2_fsync(struct file *file, loff_t start, loff_t end, int datasync)
static ssize_t ext2_file_read_iter(struct kiocb *iocb, struct iov_iter *to)
{
- if (IS_DAX(iocb->ki_filp->f_mapping->host))
+ if (IS_FSDAX(iocb->ki_filp->f_mapping->host))
return ext2_dax_read_iter(iocb, to);
return generic_file_read_iter(iocb, to);
}
static ssize_t ext2_file_write_iter(struct kiocb *iocb, struct iov_iter *from)
{
- if (IS_DAX(iocb->ki_filp->f_mapping->host))
+ if (IS_FSDAX(iocb->ki_filp->f_mapping->host))
return ext2_dax_write_iter(iocb, from);
return generic_file_write_iter(iocb, from);
}
diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c
index 4783db0e4873..5352207da9d5 100644
--- a/fs/ext2/inode.c
+++ b/fs/ext2/inode.c
@@ -733,7 +733,7 @@ static int ext2_get_blocks(struct inode *inode,
goto cleanup;
}
- if (IS_DAX(inode)) {
+ if (IS_FSDAX(inode)) {
/*
* We must unmap blocks before zeroing so that writeback cannot
* overwrite zeros with stale data from block device page cache.
@@ -940,7 +940,7 @@ ext2_direct_IO(struct kiocb *iocb, struct iov_iter *iter)
loff_t offset = iocb->ki_pos;
ssize_t ret;
- if (WARN_ON_ONCE(IS_DAX(inode)))
+ if (WARN_ON_ONCE(IS_FSDAX(inode)))
return -EIO;
ret = blockdev_direct_IO(iocb, inode, iter, ext2_get_block);
@@ -1294,7 +1294,7 @@ static int ext2_setsize(struct inode *inode, loff_t newsize)
inode_dio_wait(inode);
- if (IS_DAX(inode)) {
+ if (IS_FSDAX(inode)) {
error = iomap_zero_range(inode, newsize,
PAGE_ALIGN(newsize) - newsize, NULL,
&ext2_iomap_ops);
Powered by blists - more mailing lists