aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@redhat.com>2014-04-14 04:58:05 -0400
committerDave Chinner <david@fromorbit.com>2014-04-14 04:58:05 -0400
commit7fb2cd4d32fed48d5fd88e0e922f162c182f5f8c (patch)
tree2015e6c0100d01c990019e23402f513ee040e3e3
parentc9eaa447e77efe77b7fa4c953bd62de8297fd6c5 (diff)
xfs: remove unused tp arg from xfs_bmap_last_offset() and callers
remove unused transaction pointer from various callchains leading to xfs_bmap_last_offset(). Signed-off-by: Eric Sandeen <sandeen@redhat.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
-rw-r--r--fs/xfs/xfs_bmap.c1
-rw-r--r--fs/xfs/xfs_bmap.h4
-rw-r--r--fs/xfs/xfs_dir2.c26
-rw-r--r--fs/xfs/xfs_dir2.h4
-rw-r--r--fs/xfs/xfs_dir2_leaf.c2
-rw-r--r--fs/xfs/xfs_dir2_node.c2
-rw-r--r--fs/xfs/xfs_dir2_readdir.c2
-rw-r--r--fs/xfs/xfs_iomap.c2
8 files changed, 20 insertions, 23 deletions
diff --git a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c
index 5b6092ef51ef..f8dae85a877e 100644
--- a/fs/xfs/xfs_bmap.c
+++ b/fs/xfs/xfs_bmap.c
@@ -1675,7 +1675,6 @@ xfs_bmap_isaeof(
1675 */ 1675 */
1676int 1676int
1677xfs_bmap_last_offset( 1677xfs_bmap_last_offset(
1678 struct xfs_trans *tp,
1679 struct xfs_inode *ip, 1678 struct xfs_inode *ip,
1680 xfs_fileoff_t *last_block, 1679 xfs_fileoff_t *last_block,
1681 int whichfork) 1680 int whichfork)
diff --git a/fs/xfs/xfs_bmap.h b/fs/xfs/xfs_bmap.h
index f84bd7af43be..38ba36e9b2f0 100644
--- a/fs/xfs/xfs_bmap.h
+++ b/fs/xfs/xfs_bmap.h
@@ -156,8 +156,8 @@ int xfs_bmap_first_unused(struct xfs_trans *tp, struct xfs_inode *ip,
156 xfs_extlen_t len, xfs_fileoff_t *unused, int whichfork); 156 xfs_extlen_t len, xfs_fileoff_t *unused, int whichfork);
157int xfs_bmap_last_before(struct xfs_trans *tp, struct xfs_inode *ip, 157int xfs_bmap_last_before(struct xfs_trans *tp, struct xfs_inode *ip,
158 xfs_fileoff_t *last_block, int whichfork); 158 xfs_fileoff_t *last_block, int whichfork);
159int xfs_bmap_last_offset(struct xfs_trans *tp, struct xfs_inode *ip, 159int xfs_bmap_last_offset(struct xfs_inode *ip, xfs_fileoff_t *unused,
160 xfs_fileoff_t *unused, int whichfork); 160 int whichfork);
161int xfs_bmap_one_block(struct xfs_inode *ip, int whichfork); 161int xfs_bmap_one_block(struct xfs_inode *ip, int whichfork);
162int xfs_bmap_read_extents(struct xfs_trans *tp, struct xfs_inode *ip, 162int xfs_bmap_read_extents(struct xfs_trans *tp, struct xfs_inode *ip,
163 int whichfork); 163 int whichfork);
diff --git a/fs/xfs/xfs_dir2.c b/fs/xfs/xfs_dir2.c
index fda46253966a..e365c98c0f1e 100644
--- a/fs/xfs/xfs_dir2.c
+++ b/fs/xfs/xfs_dir2.c
@@ -244,7 +244,7 @@ xfs_dir_createname(
244 goto out_free; 244 goto out_free;
245 } 245 }
246 246
247 rval = xfs_dir2_isblock(tp, dp, &v); 247 rval = xfs_dir2_isblock(dp, &v);
248 if (rval) 248 if (rval)
249 goto out_free; 249 goto out_free;
250 if (v) { 250 if (v) {
@@ -252,7 +252,7 @@ xfs_dir_createname(
252 goto out_free; 252 goto out_free;
253 } 253 }
254 254
255 rval = xfs_dir2_isleaf(tp, dp, &v); 255 rval = xfs_dir2_isleaf(dp, &v);
256 if (rval) 256 if (rval)
257 goto out_free; 257 goto out_free;
258 if (v) 258 if (v)
@@ -336,7 +336,7 @@ xfs_dir_lookup(
336 goto out_check_rval; 336 goto out_check_rval;
337 } 337 }
338 338
339 rval = xfs_dir2_isblock(tp, dp, &v); 339 rval = xfs_dir2_isblock(dp, &v);
340 if (rval) 340 if (rval)
341 goto out_free; 341 goto out_free;
342 if (v) { 342 if (v) {
@@ -344,7 +344,7 @@ xfs_dir_lookup(
344 goto out_check_rval; 344 goto out_check_rval;
345 } 345 }
346 346
347 rval = xfs_dir2_isleaf(tp, dp, &v); 347 rval = xfs_dir2_isleaf(dp, &v);
348 if (rval) 348 if (rval)
349 goto out_free; 349 goto out_free;
350 if (v) 350 if (v)
@@ -408,7 +408,7 @@ xfs_dir_removename(
408 goto out_free; 408 goto out_free;
409 } 409 }
410 410
411 rval = xfs_dir2_isblock(tp, dp, &v); 411 rval = xfs_dir2_isblock(dp, &v);
412 if (rval) 412 if (rval)
413 goto out_free; 413 goto out_free;
414 if (v) { 414 if (v) {
@@ -416,7 +416,7 @@ xfs_dir_removename(
416 goto out_free; 416 goto out_free;
417 } 417 }
418 418
419 rval = xfs_dir2_isleaf(tp, dp, &v); 419 rval = xfs_dir2_isleaf(dp, &v);
420 if (rval) 420 if (rval)
421 goto out_free; 421 goto out_free;
422 if (v) 422 if (v)
@@ -472,7 +472,7 @@ xfs_dir_replace(
472 goto out_free; 472 goto out_free;
473 } 473 }
474 474
475 rval = xfs_dir2_isblock(tp, dp, &v); 475 rval = xfs_dir2_isblock(dp, &v);
476 if (rval) 476 if (rval)
477 goto out_free; 477 goto out_free;
478 if (v) { 478 if (v) {
@@ -480,7 +480,7 @@ xfs_dir_replace(
480 goto out_free; 480 goto out_free;
481 } 481 }
482 482
483 rval = xfs_dir2_isleaf(tp, dp, &v); 483 rval = xfs_dir2_isleaf(dp, &v);
484 if (rval) 484 if (rval)
485 goto out_free; 485 goto out_free;
486 if (v) 486 if (v)
@@ -531,7 +531,7 @@ xfs_dir_canenter(
531 goto out_free; 531 goto out_free;
532 } 532 }
533 533
534 rval = xfs_dir2_isblock(tp, dp, &v); 534 rval = xfs_dir2_isblock(dp, &v);
535 if (rval) 535 if (rval)
536 goto out_free; 536 goto out_free;
537 if (v) { 537 if (v) {
@@ -539,7 +539,7 @@ xfs_dir_canenter(
539 goto out_free; 539 goto out_free;
540 } 540 }
541 541
542 rval = xfs_dir2_isleaf(tp, dp, &v); 542 rval = xfs_dir2_isleaf(dp, &v);
543 if (rval) 543 if (rval)
544 goto out_free; 544 goto out_free;
545 if (v) 545 if (v)
@@ -607,7 +607,6 @@ xfs_dir2_grow_inode(
607 */ 607 */
608int 608int
609xfs_dir2_isblock( 609xfs_dir2_isblock(
610 xfs_trans_t *tp,
611 xfs_inode_t *dp, 610 xfs_inode_t *dp,
612 int *vp) /* out: 1 is block, 0 is not block */ 611 int *vp) /* out: 1 is block, 0 is not block */
613{ 612{
@@ -616,7 +615,7 @@ xfs_dir2_isblock(
616 int rval; 615 int rval;
617 616
618 mp = dp->i_mount; 617 mp = dp->i_mount;
619 if ((rval = xfs_bmap_last_offset(tp, dp, &last, XFS_DATA_FORK))) 618 if ((rval = xfs_bmap_last_offset(dp, &last, XFS_DATA_FORK)))
620 return rval; 619 return rval;
621 rval = XFS_FSB_TO_B(mp, last) == mp->m_dirblksize; 620 rval = XFS_FSB_TO_B(mp, last) == mp->m_dirblksize;
622 ASSERT(rval == 0 || dp->i_d.di_size == mp->m_dirblksize); 621 ASSERT(rval == 0 || dp->i_d.di_size == mp->m_dirblksize);
@@ -629,7 +628,6 @@ xfs_dir2_isblock(
629 */ 628 */
630int 629int
631xfs_dir2_isleaf( 630xfs_dir2_isleaf(
632 xfs_trans_t *tp,
633 xfs_inode_t *dp, 631 xfs_inode_t *dp,
634 int *vp) /* out: 1 is leaf, 0 is not leaf */ 632 int *vp) /* out: 1 is leaf, 0 is not leaf */
635{ 633{
@@ -638,7 +636,7 @@ xfs_dir2_isleaf(
638 int rval; 636 int rval;
639 637
640 mp = dp->i_mount; 638 mp = dp->i_mount;
641 if ((rval = xfs_bmap_last_offset(tp, dp, &last, XFS_DATA_FORK))) 639 if ((rval = xfs_bmap_last_offset(dp, &last, XFS_DATA_FORK)))
642 return rval; 640 return rval;
643 *vp = last == mp->m_dirleafblk + (1 << mp->m_sb.sb_dirblklog); 641 *vp = last == mp->m_dirleafblk + (1 << mp->m_sb.sb_dirblklog);
644 return 0; 642 return 0;
diff --git a/fs/xfs/xfs_dir2.h b/fs/xfs/xfs_dir2.h
index cec70e0781ab..64a6b19c2fd0 100644
--- a/fs/xfs/xfs_dir2.h
+++ b/fs/xfs/xfs_dir2.h
@@ -142,8 +142,8 @@ extern int xfs_dir2_sf_to_block(struct xfs_da_args *args);
142/* 142/*
143 * Interface routines used by userspace utilities 143 * Interface routines used by userspace utilities
144 */ 144 */
145extern int xfs_dir2_isblock(struct xfs_trans *tp, struct xfs_inode *dp, int *r); 145extern int xfs_dir2_isblock(struct xfs_inode *dp, int *r);
146extern int xfs_dir2_isleaf(struct xfs_trans *tp, struct xfs_inode *dp, int *r); 146extern int xfs_dir2_isleaf(struct xfs_inode *dp, int *r);
147extern int xfs_dir2_shrink_inode(struct xfs_da_args *args, xfs_dir2_db_t db, 147extern int xfs_dir2_shrink_inode(struct xfs_da_args *args, xfs_dir2_db_t db,
148 struct xfs_buf *bp); 148 struct xfs_buf *bp);
149 149
diff --git a/fs/xfs/xfs_dir2_leaf.c b/fs/xfs/xfs_dir2_leaf.c
index d36e97df1187..f571723e2378 100644
--- a/fs/xfs/xfs_dir2_leaf.c
+++ b/fs/xfs/xfs_dir2_leaf.c
@@ -1708,7 +1708,7 @@ xfs_dir2_node_to_leaf(
1708 /* 1708 /*
1709 * Get the last offset in the file. 1709 * Get the last offset in the file.
1710 */ 1710 */
1711 if ((error = xfs_bmap_last_offset(tp, dp, &fo, XFS_DATA_FORK))) { 1711 if ((error = xfs_bmap_last_offset(dp, &fo, XFS_DATA_FORK))) {
1712 return error; 1712 return error;
1713 } 1713 }
1714 fo -= mp->m_dirblkfsbs; 1714 fo -= mp->m_dirblkfsbs;
diff --git a/fs/xfs/xfs_dir2_node.c b/fs/xfs/xfs_dir2_node.c
index cb434d732681..9cb91ee0914b 100644
--- a/fs/xfs/xfs_dir2_node.c
+++ b/fs/xfs/xfs_dir2_node.c
@@ -1727,7 +1727,7 @@ xfs_dir2_node_addname_int(
1727 if (dbno == -1) { 1727 if (dbno == -1) {
1728 xfs_fileoff_t fo; /* freespace block number */ 1728 xfs_fileoff_t fo; /* freespace block number */
1729 1729
1730 if ((error = xfs_bmap_last_offset(tp, dp, &fo, XFS_DATA_FORK))) 1730 if ((error = xfs_bmap_last_offset(dp, &fo, XFS_DATA_FORK)))
1731 return error; 1731 return error;
1732 lastfbno = xfs_dir2_da_to_db(mp, (xfs_dablk_t)fo); 1732 lastfbno = xfs_dir2_da_to_db(mp, (xfs_dablk_t)fo);
1733 fbno = ifbno; 1733 fbno = ifbno;
diff --git a/fs/xfs/xfs_dir2_readdir.c b/fs/xfs/xfs_dir2_readdir.c
index aead369e1c30..a18000f71426 100644
--- a/fs/xfs/xfs_dir2_readdir.c
+++ b/fs/xfs/xfs_dir2_readdir.c
@@ -687,7 +687,7 @@ xfs_readdir(
687 lock_mode = xfs_ilock_data_map_shared(dp); 687 lock_mode = xfs_ilock_data_map_shared(dp);
688 if (dp->i_d.di_format == XFS_DINODE_FMT_LOCAL) 688 if (dp->i_d.di_format == XFS_DINODE_FMT_LOCAL)
689 rval = xfs_dir2_sf_getdents(dp, ctx); 689 rval = xfs_dir2_sf_getdents(dp, ctx);
690 else if ((rval = xfs_dir2_isblock(NULL, dp, &v))) 690 else if ((rval = xfs_dir2_isblock(dp, &v)))
691 ; 691 ;
692 else if (v) 692 else if (v)
693 rval = xfs_dir2_block_getdents(dp, ctx); 693 rval = xfs_dir2_block_getdents(dp, ctx);
diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c
index 3b80ebae05f5..6c5eb4c551e3 100644
--- a/fs/xfs/xfs_iomap.c
+++ b/fs/xfs/xfs_iomap.c
@@ -730,7 +730,7 @@ xfs_iomap_write_allocate(
730 */ 730 */
731 nimaps = 1; 731 nimaps = 1;
732 end_fsb = XFS_B_TO_FSB(mp, XFS_ISIZE(ip)); 732 end_fsb = XFS_B_TO_FSB(mp, XFS_ISIZE(ip));
733 error = xfs_bmap_last_offset(NULL, ip, &last_block, 733 error = xfs_bmap_last_offset(ip, &last_block,
734 XFS_DATA_FORK); 734 XFS_DATA_FORK);
735 if (error) 735 if (error)
736 goto trans_cancel; 736 goto trans_cancel;