summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_reflink.c
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2019-02-22 03:26:35 +0300
committerDarrick J. Wong <darrick.wong@oracle.com>2019-02-25 20:04:31 +0300
commitaffe250a085d8230fa44fee1a0b7929a986e7580 (patch)
tree8c52954fe36046274579c7109a5968a5277d712d /fs/xfs/xfs_reflink.c
parent081a8ae2a54e85ddd77db77d50b1a04b3c4731c9 (diff)
downloadlinux-affe250a085d8230fa44fee1a0b7929a986e7580.tar.xz
xfs: don't pass iomap flags to xfs_reflink_allocate_cow
Don't pass raw iomap flags to xfs_reflink_allocate_cow; signal our intention with a boolean argument. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Brian Foster <bfoster@redhat.com>
Diffstat (limited to 'fs/xfs/xfs_reflink.c')
-rw-r--r--fs/xfs/xfs_reflink.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/xfs_reflink.c b/fs/xfs/xfs_reflink.c
index e2d9179bd50d..d42e3ef9050e 100644
--- a/fs/xfs/xfs_reflink.c
+++ b/fs/xfs/xfs_reflink.c
@@ -361,7 +361,7 @@ xfs_reflink_allocate_cow(
struct xfs_bmbt_irec *imap,
bool *shared,
uint *lockmode,
- unsigned iomap_flags)
+ bool convert_now)
{
struct xfs_mount *mp = ip->i_mount;
xfs_fileoff_t offset_fsb = imap->br_startoff;
@@ -444,7 +444,7 @@ convert:
* to initiate a disk write. For direct I/O we are going to write the
* data and need the conversion, but for buffered writes we're done.
*/
- if (!(iomap_flags & IOMAP_DIRECT) || imap->br_state == XFS_EXT_NORM)
+ if (!convert_now || imap->br_state == XFS_EXT_NORM)
return 0;
trace_xfs_reflink_convert_cow(ip, imap);
return xfs_reflink_convert_cow_locked(ip, offset_fsb, count_fsb);