aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs/xfs_bmap.c
diff options
context:
space:
mode:
authorBrian Foster <bfoster@redhat.com>2018-07-11 22:26:25 -0700
committerDarrick J. Wong <darrick.wong@oracle.com>2018-07-11 22:26:25 -0700
commit2af528425342dc8f696b28693c5e61587cd72b43 (patch)
tree0b9bebd7ce3f2256ab3feff9d1d1b214fa25346b /fs/xfs/libxfs/xfs_bmap.c
parentxfs: remove xfs_bmapi_write() firstblock param (diff)
downloadlinux-dev-2af528425342dc8f696b28693c5e61587cd72b43.tar.xz
linux-dev-2af528425342dc8f696b28693c5e61587cd72b43.zip
xfs: remove xfs_bunmapi() firstblock param
All callers pass ->t_firstblock from the current transaction. Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to '')
-rw-r--r--fs/xfs/libxfs/xfs_bmap.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c
index ca30e972288a..619d3adc5923 100644
--- a/fs/xfs/libxfs/xfs_bmap.c
+++ b/fs/xfs/libxfs/xfs_bmap.c
@@ -5122,9 +5122,7 @@ __xfs_bunmapi(
xfs_fileoff_t start, /* first file offset deleted */
xfs_filblks_t *rlen, /* i/o: amount remaining */
int flags, /* misc flags */
- xfs_extnum_t nexts, /* number of extents max */
- xfs_fsblock_t *firstblock) /* first allocated block
- controls a.g. for allocs */
+ xfs_extnum_t nexts) /* number of extents max */
{
struct xfs_btree_cur *cur; /* bmap btree cursor */
struct xfs_bmbt_irec del; /* extent being deleted */
@@ -5198,7 +5196,7 @@ __xfs_bunmapi(
if (ifp->if_flags & XFS_IFBROOT) {
ASSERT(XFS_IFORK_FORMAT(ip, whichfork) == XFS_DINODE_FMT_BTREE);
cur = xfs_bmbt_init_cursor(mp, tp, ip, whichfork);
- cur->bc_private.b.firstblock = *firstblock;
+ cur->bc_private.b.firstblock = tp->t_firstblock;
cur->bc_private.b.flags = 0;
} else
cur = NULL;
@@ -5314,7 +5312,7 @@ __xfs_bunmapi(
del.br_state = XFS_EXT_UNWRITTEN;
error = xfs_bmap_add_extent_unwritten_real(tp, ip,
whichfork, &icur, &cur, &del,
- firstblock, &logflags);
+ &tp->t_firstblock, &logflags);
if (error)
goto error0;
goto nodelete;
@@ -5371,7 +5369,8 @@ __xfs_bunmapi(
prev.br_state = XFS_EXT_UNWRITTEN;
error = xfs_bmap_add_extent_unwritten_real(tp,
ip, whichfork, &icur, &cur,
- &prev, firstblock, &logflags);
+ &prev, &tp->t_firstblock,
+ &logflags);
if (error)
goto error0;
goto nodelete;
@@ -5380,7 +5379,8 @@ __xfs_bunmapi(
del.br_state = XFS_EXT_UNWRITTEN;
error = xfs_bmap_add_extent_unwritten_real(tp,
ip, whichfork, &icur, &cur,
- &del, firstblock, &logflags);
+ &del, &tp->t_firstblock,
+ &logflags);
if (error)
goto error0;
goto nodelete;
@@ -5427,8 +5427,8 @@ nodelete:
*/
if (xfs_bmap_needs_btree(ip, whichfork)) {
ASSERT(cur == NULL);
- error = xfs_bmap_extents_to_btree(tp, ip, firstblock, &cur, 0,
- &tmp_logflags, whichfork);
+ error = xfs_bmap_extents_to_btree(tp, ip, &tp->t_firstblock,
+ &cur, 0, &tmp_logflags, whichfork);
logflags |= tmp_logflags;
if (error)
goto error0;
@@ -5467,7 +5467,7 @@ error0:
xfs_trans_log_inode(tp, ip, logflags);
if (cur) {
if (!error) {
- *firstblock = cur->bc_private.b.firstblock;
+ tp->t_firstblock = cur->bc_private.b.firstblock;
cur->bc_private.b.allocated = 0;
}
xfs_btree_del_cursor(cur,
@@ -5485,12 +5485,11 @@ xfs_bunmapi(
xfs_filblks_t len,
int flags,
xfs_extnum_t nexts,
- xfs_fsblock_t *firstblock,
int *done)
{
int error;
- error = __xfs_bunmapi(tp, ip, bno, &len, flags, nexts, firstblock);
+ error = __xfs_bunmapi(tp, ip, bno, &len, flags, nexts);
*done = (len == 0);
return error;
}
@@ -6148,7 +6147,7 @@ xfs_bmap_finish_one(
break;
case XFS_BMAP_UNMAP:
error = __xfs_bunmapi(tp, ip, startoff, blockcount,
- XFS_BMAPI_REMAP, 1, &tp->t_firstblock);
+ XFS_BMAPI_REMAP, 1);
break;
default:
ASSERT(0);