xfs_reflink.c (f150b4234397448c6abab8785e58a222bfd9ec00) xfs_reflink.c (da781e64b28c1d72f84bab6a884359c9c8d522aa)
1// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Copyright (C) 2016 Oracle. All Rights Reserved.
4 * Author: Darrick J. Wong <darrick.wong@oracle.com>
5 */
6#include "xfs.h"
7#include "xfs_fs.h"
8#include "xfs_shared.h"

--- 396 unchanged lines hidden (view full) ---

405 if (error)
406 goto out_trans_cancel;
407
408 xfs_trans_ijoin(tp, ip, 0);
409
410 /* Allocate the entire reservation as unwritten blocks. */
411 nimaps = 1;
412 error = xfs_bmapi_write(tp, ip, imap->br_startoff, imap->br_blockcount,
1// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Copyright (C) 2016 Oracle. All Rights Reserved.
4 * Author: Darrick J. Wong <darrick.wong@oracle.com>
5 */
6#include "xfs.h"
7#include "xfs_fs.h"
8#include "xfs_shared.h"

--- 396 unchanged lines hidden (view full) ---

405 if (error)
406 goto out_trans_cancel;
407
408 xfs_trans_ijoin(tp, ip, 0);
409
410 /* Allocate the entire reservation as unwritten blocks. */
411 nimaps = 1;
412 error = xfs_bmapi_write(tp, ip, imap->br_startoff, imap->br_blockcount,
413 XFS_BMAPI_COWFORK | XFS_BMAPI_PREALLOC,
414 resblks, cmap, &nimaps);
413 XFS_BMAPI_COWFORK | XFS_BMAPI_PREALLOC, 0, cmap,
414 &nimaps);
415 if (error)
416 goto out_unreserve;
417
418 xfs_inode_set_cowblocks_tag(ip);
419 error = xfs_trans_commit(tp);
420 if (error)
421 return error;
422

--- 1125 unchanged lines hidden ---
415 if (error)
416 goto out_unreserve;
417
418 xfs_inode_set_cowblocks_tag(ip);
419 error = xfs_trans_commit(tp);
420 if (error)
421 return error;
422

--- 1125 unchanged lines hidden ---