summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_file.c
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2016-10-03 09:11:50 -0700
committerDarrick J. Wong <darrick.wong@oracle.com>2016-10-05 16:26:31 -0700
commit4f435ebe7d0422af61cdcddbbcc659888645a1e1 (patch)
tree49f6833f8b5b9e71c2df1b540fcbe933dfcd7087 /fs/xfs/xfs_file.c
parentc8e156ac336d82f67d7adc014404a2251e9dad09 (diff)
downloadlinux-stable-4f435ebe7d0422af61cdcddbbcc659888645a1e1.tar.gz
linux-stable-4f435ebe7d0422af61cdcddbbcc659888645a1e1.tar.bz2
linux-stable-4f435ebe7d0422af61cdcddbbcc659888645a1e1.zip
xfs: don't mix reflink and DAX mode for now
Since we don't have a strategy for handling both DAX and reflink, for now we'll just prohibit both being set at the same time. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/xfs_file.c')
-rw-r--r--fs/xfs/xfs_file.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c
index 0726df88bce2..54c27edb74bc 100644
--- a/fs/xfs/xfs_file.c
+++ b/fs/xfs/xfs_file.c
@@ -1055,6 +1055,10 @@ xfs_file_share_range(
if (!S_ISREG(inode_in->i_mode) || !S_ISREG(inode_out->i_mode))
return -EINVAL;
+ /* Don't share DAX file data for now. */
+ if (IS_DAX(inode_in) || IS_DAX(inode_out))
+ return -EINVAL;
+
/* Are we going all the way to the end? */
isize = i_size_read(inode_in);
if (isize == 0)