aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@sandeen.net>2007-02-10 02:37:16 -0500
committerTim Shimmin <tes@sgi.com>2007-02-10 02:37:16 -0500
commitf7c99b6fc7b3791cd24e0763cd4967d744c164a3 (patch)
tree543581c6ebe8987ff83b6d8b3425e5c2723bbf3d /fs
parent39058a0e12a8b2dcb8f9345ecad52dbcfc120ef7 (diff)
[XFS] Remove unused argument to xfs_bmap_finish
The firstblock argument to xfs_bmap_finish is not used by that function. Remove it and cleanup the code a bit. Patch provided by Eric Sandeen. SGI-PV: 960196 SGI-Modid: xfs-linux-melb:xfs-kern:28034a Signed-off-by: Eric Sandeen <sandeen@sandeen.net> Signed-off-by: David Chinner <dgc@sgi.com> Signed-off-by: Tim Shimmin <tes@sgi.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/xfs/quota/xfs_dquot.c2
-rw-r--r--fs/xfs/xfs_attr.c18
-rw-r--r--fs/xfs/xfs_bmap.c3
-rw-r--r--fs/xfs/xfs_bmap.h1
-rw-r--r--fs/xfs/xfs_inode.c3
-rw-r--r--fs/xfs/xfs_iomap.c8
-rw-r--r--fs/xfs/xfs_rename.c2
-rw-r--r--fs/xfs/xfs_rtalloc.c2
-rw-r--r--fs/xfs/xfs_vnodeops.c21
9 files changed, 25 insertions, 35 deletions
diff --git a/fs/xfs/quota/xfs_dquot.c b/fs/xfs/quota/xfs_dquot.c
index 3aa771531856..c76358bbcf3b 100644
--- a/fs/xfs/quota/xfs_dquot.c
+++ b/fs/xfs/quota/xfs_dquot.c
@@ -484,7 +484,7 @@ xfs_qm_dqalloc(
484 484
485 xfs_trans_bhold(tp, bp); 485 xfs_trans_bhold(tp, bp);
486 486
487 if ((error = xfs_bmap_finish(tpp, &flist, firstblock, &committed))) { 487 if ((error = xfs_bmap_finish(tpp, &flist, &committed))) {
488 goto error1; 488 goto error1;
489 } 489 }
490 490
diff --git a/fs/xfs/xfs_attr.c b/fs/xfs/xfs_attr.c
index a5cb0972bb8a..9d358ffce4e5 100644
--- a/fs/xfs/xfs_attr.c
+++ b/fs/xfs/xfs_attr.c
@@ -349,7 +349,7 @@ xfs_attr_set_int(xfs_inode_t *dp, const char *name, int namelen,
349 error = xfs_attr_shortform_to_leaf(&args); 349 error = xfs_attr_shortform_to_leaf(&args);
350 if (!error) { 350 if (!error) {
351 error = xfs_bmap_finish(&args.trans, args.flist, 351 error = xfs_bmap_finish(&args.trans, args.flist,
352 *args.firstblock, &committed); 352 &committed);
353 } 353 }
354 if (error) { 354 if (error) {
355 ASSERT(committed); 355 ASSERT(committed);
@@ -976,7 +976,7 @@ xfs_attr_leaf_addname(xfs_da_args_t *args)
976 error = xfs_attr_leaf_to_node(args); 976 error = xfs_attr_leaf_to_node(args);
977 if (!error) { 977 if (!error) {
978 error = xfs_bmap_finish(&args->trans, args->flist, 978 error = xfs_bmap_finish(&args->trans, args->flist,
979 *args->firstblock, &committed); 979 &committed);
980 } 980 }
981 if (error) { 981 if (error) {
982 ASSERT(committed); 982 ASSERT(committed);
@@ -1077,7 +1077,6 @@ xfs_attr_leaf_addname(xfs_da_args_t *args)
1077 if (!error) { 1077 if (!error) {
1078 error = xfs_bmap_finish(&args->trans, 1078 error = xfs_bmap_finish(&args->trans,
1079 args->flist, 1079 args->flist,
1080 *args->firstblock,
1081 &committed); 1080 &committed);
1082 } 1081 }
1083 if (error) { 1082 if (error) {
@@ -1155,7 +1154,7 @@ xfs_attr_leaf_removename(xfs_da_args_t *args)
1155 /* bp is gone due to xfs_da_shrink_inode */ 1154 /* bp is gone due to xfs_da_shrink_inode */
1156 if (!error) { 1155 if (!error) {
1157 error = xfs_bmap_finish(&args->trans, args->flist, 1156 error = xfs_bmap_finish(&args->trans, args->flist,
1158 *args->firstblock, &committed); 1157 &committed);
1159 } 1158 }
1160 if (error) { 1159 if (error) {
1161 ASSERT(committed); 1160 ASSERT(committed);
@@ -1310,7 +1309,6 @@ restart:
1310 if (!error) { 1309 if (!error) {
1311 error = xfs_bmap_finish(&args->trans, 1310 error = xfs_bmap_finish(&args->trans,
1312 args->flist, 1311 args->flist,
1313 *args->firstblock,
1314 &committed); 1312 &committed);
1315 } 1313 }
1316 if (error) { 1314 if (error) {
@@ -1350,7 +1348,7 @@ restart:
1350 error = xfs_da_split(state); 1348 error = xfs_da_split(state);
1351 if (!error) { 1349 if (!error) {
1352 error = xfs_bmap_finish(&args->trans, args->flist, 1350 error = xfs_bmap_finish(&args->trans, args->flist,
1353 *args->firstblock, &committed); 1351 &committed);
1354 } 1352 }
1355 if (error) { 1353 if (error) {
1356 ASSERT(committed); 1354 ASSERT(committed);
@@ -1462,7 +1460,6 @@ restart:
1462 if (!error) { 1460 if (!error) {
1463 error = xfs_bmap_finish(&args->trans, 1461 error = xfs_bmap_finish(&args->trans,
1464 args->flist, 1462 args->flist,
1465 *args->firstblock,
1466 &committed); 1463 &committed);
1467 } 1464 }
1468 if (error) { 1465 if (error) {
@@ -1597,7 +1594,7 @@ xfs_attr_node_removename(xfs_da_args_t *args)
1597 error = xfs_da_join(state); 1594 error = xfs_da_join(state);
1598 if (!error) { 1595 if (!error) {
1599 error = xfs_bmap_finish(&args->trans, args->flist, 1596 error = xfs_bmap_finish(&args->trans, args->flist,
1600 *args->firstblock, &committed); 1597 &committed);
1601 } 1598 }
1602 if (error) { 1599 if (error) {
1603 ASSERT(committed); 1600 ASSERT(committed);
@@ -1649,7 +1646,6 @@ xfs_attr_node_removename(xfs_da_args_t *args)
1649 if (!error) { 1646 if (!error) {
1650 error = xfs_bmap_finish(&args->trans, 1647 error = xfs_bmap_finish(&args->trans,
1651 args->flist, 1648 args->flist,
1652 *args->firstblock,
1653 &committed); 1649 &committed);
1654 } 1650 }
1655 if (error) { 1651 if (error) {
@@ -2093,7 +2089,7 @@ xfs_attr_rmtval_set(xfs_da_args_t *args)
2093 args->flist, NULL); 2089 args->flist, NULL);
2094 if (!error) { 2090 if (!error) {
2095 error = xfs_bmap_finish(&args->trans, args->flist, 2091 error = xfs_bmap_finish(&args->trans, args->flist,
2096 *args->firstblock, &committed); 2092 &committed);
2097 } 2093 }
2098 if (error) { 2094 if (error) {
2099 ASSERT(committed); 2095 ASSERT(committed);
@@ -2249,7 +2245,7 @@ xfs_attr_rmtval_remove(xfs_da_args_t *args)
2249 NULL, &done); 2245 NULL, &done);
2250 if (!error) { 2246 if (!error) {
2251 error = xfs_bmap_finish(&args->trans, args->flist, 2247 error = xfs_bmap_finish(&args->trans, args->flist,
2252 *args->firstblock, &committed); 2248 &committed);
2253 } 2249 }
2254 if (error) { 2250 if (error) {
2255 ASSERT(committed); 2251 ASSERT(committed);
diff --git a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c
index fa459a184b8a..20b6922e2729 100644
--- a/fs/xfs/xfs_bmap.c
+++ b/fs/xfs/xfs_bmap.c
@@ -4080,7 +4080,7 @@ xfs_bmap_add_attrfork(
4080 } else 4080 } else
4081 XFS_SB_UNLOCK(mp, s); 4081 XFS_SB_UNLOCK(mp, s);
4082 } 4082 }
4083 if ((error = xfs_bmap_finish(&tp, &flist, firstblock, &committed))) 4083 if ((error = xfs_bmap_finish(&tp, &flist, &committed)))
4084 goto error2; 4084 goto error2;
4085 error = xfs_trans_commit(tp, XFS_TRANS_PERM_LOG_RES, NULL); 4085 error = xfs_trans_commit(tp, XFS_TRANS_PERM_LOG_RES, NULL);
4086 ASSERT(ip->i_df.if_ext_max == 4086 ASSERT(ip->i_df.if_ext_max ==
@@ -4213,7 +4213,6 @@ int /* error */
4213xfs_bmap_finish( 4213xfs_bmap_finish(
4214 xfs_trans_t **tp, /* transaction pointer addr */ 4214 xfs_trans_t **tp, /* transaction pointer addr */
4215 xfs_bmap_free_t *flist, /* i/o: list extents to free */ 4215 xfs_bmap_free_t *flist, /* i/o: list extents to free */
4216 xfs_fsblock_t firstblock, /* controlled ag for allocs */
4217 int *committed) /* xact committed or not */ 4216 int *committed) /* xact committed or not */
4218{ 4217{
4219 xfs_efd_log_item_t *efd; /* extent free data */ 4218 xfs_efd_log_item_t *efd; /* extent free data */
diff --git a/fs/xfs/xfs_bmap.h b/fs/xfs/xfs_bmap.h
index 80e93409b78d..4f24c7e39b31 100644
--- a/fs/xfs/xfs_bmap.h
+++ b/fs/xfs/xfs_bmap.h
@@ -202,7 +202,6 @@ int /* error */
202xfs_bmap_finish( 202xfs_bmap_finish(
203 struct xfs_trans **tp, /* transaction pointer addr */ 203 struct xfs_trans **tp, /* transaction pointer addr */
204 xfs_bmap_free_t *flist, /* i/o: list extents to free */ 204 xfs_bmap_free_t *flist, /* i/o: list extents to free */
205 xfs_fsblock_t firstblock, /* controlled a.g. for allocs */
206 int *committed); /* xact committed or not */ 205 int *committed); /* xact committed or not */
207 206
208/* 207/*
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index 295577d67ea0..7efcf2545cfa 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -1699,8 +1699,7 @@ xfs_itruncate_finish(
1699 * Duplicate the transaction that has the permanent 1699 * Duplicate the transaction that has the permanent
1700 * reservation and commit the old transaction. 1700 * reservation and commit the old transaction.
1701 */ 1701 */
1702 error = xfs_bmap_finish(tp, &free_list, first_block, 1702 error = xfs_bmap_finish(tp, &free_list, &committed);
1703 &committed);
1704 ntp = *tp; 1703 ntp = *tp;
1705 if (error) { 1704 if (error) {
1706 /* 1705 /*
diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c
index 19655124da78..2069e2c2be75 100644
--- a/fs/xfs/xfs_iomap.c
+++ b/fs/xfs/xfs_iomap.c
@@ -542,7 +542,7 @@ xfs_iomap_write_direct(
542 /* 542 /*
543 * Complete the transaction 543 * Complete the transaction
544 */ 544 */
545 error = xfs_bmap_finish(&tp, &free_list, firstfsb, &committed); 545 error = xfs_bmap_finish(&tp, &free_list, &committed);
546 if (error) 546 if (error)
547 goto error0; 547 goto error0;
548 error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES, NULL); 548 error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES, NULL);
@@ -838,8 +838,7 @@ xfs_iomap_write_allocate(
838 if (error) 838 if (error)
839 goto trans_cancel; 839 goto trans_cancel;
840 840
841 error = xfs_bmap_finish(&tp, &free_list, 841 error = xfs_bmap_finish(&tp, &free_list, &committed);
842 first_block, &committed);
843 if (error) 842 if (error)
844 goto trans_cancel; 843 goto trans_cancel;
845 844
@@ -947,8 +946,7 @@ xfs_iomap_write_unwritten(
947 if (error) 946 if (error)
948 goto error_on_bmapi_transaction; 947 goto error_on_bmapi_transaction;
949 948
950 error = xfs_bmap_finish(&(tp), &(free_list), 949 error = xfs_bmap_finish(&(tp), &(free_list), &committed);
951 firstfsb, &committed);
952 if (error) 950 if (error)
953 goto error_on_bmapi_transaction; 951 goto error_on_bmapi_transaction;
954 952
diff --git a/fs/xfs/xfs_rename.c b/fs/xfs/xfs_rename.c
index d98171deaa1c..4c6573d784cd 100644
--- a/fs/xfs/xfs_rename.c
+++ b/fs/xfs/xfs_rename.c
@@ -565,7 +565,7 @@ xfs_rename(
565 IHOLD(target_ip); 565 IHOLD(target_ip);
566 IHOLD(src_ip); 566 IHOLD(src_ip);
567 567
568 error = xfs_bmap_finish(&tp, &free_list, first_block, &committed); 568 error = xfs_bmap_finish(&tp, &free_list, &committed);
569 if (error) { 569 if (error) {
570 xfs_bmap_cancel(&free_list); 570 xfs_bmap_cancel(&free_list);
571 xfs_trans_cancel(tp, (XFS_TRANS_RELEASE_LOG_RES | 571 xfs_trans_cancel(tp, (XFS_TRANS_RELEASE_LOG_RES |
diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c
index 880c73271c05..dcf57dc071ac 100644
--- a/fs/xfs/xfs_rtalloc.c
+++ b/fs/xfs/xfs_rtalloc.c
@@ -147,7 +147,7 @@ xfs_growfs_rt_alloc(
147 /* 147 /*
148 * Free any blocks freed up in the transaction, then commit. 148 * Free any blocks freed up in the transaction, then commit.
149 */ 149 */
150 error = xfs_bmap_finish(&tp, &flist, firstblock, &committed); 150 error = xfs_bmap_finish(&tp, &flist, &committed);
151 if (error) 151 if (error)
152 goto error_exit; 152 goto error_exit;
153 xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES, NULL); 153 xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES, NULL);
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c
index bda774a04b8f..718e18c142a5 100644
--- a/fs/xfs/xfs_vnodeops.c
+++ b/fs/xfs/xfs_vnodeops.c
@@ -1381,7 +1381,7 @@ xfs_inactive_symlink_rmt(
1381 /* 1381 /*
1382 * Commit the first transaction. This logs the EFI and the inode. 1382 * Commit the first transaction. This logs the EFI and the inode.
1383 */ 1383 */
1384 if ((error = xfs_bmap_finish(&tp, &free_list, first_block, &committed))) 1384 if ((error = xfs_bmap_finish(&tp, &free_list, &committed)))
1385 goto error1; 1385 goto error1;
1386 /* 1386 /*
1387 * The transaction must have been committed, since there were 1387 * The transaction must have been committed, since there were
@@ -1790,8 +1790,7 @@ xfs_inactive(
1790 * Just ignore errors at this point. There is 1790 * Just ignore errors at this point. There is
1791 * nothing we can do except to try to keep going. 1791 * nothing we can do except to try to keep going.
1792 */ 1792 */
1793 (void) xfs_bmap_finish(&tp, &free_list, first_block, 1793 (void) xfs_bmap_finish(&tp, &free_list, &committed);
1794 &committed);
1795 (void) xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES, NULL); 1794 (void) xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES, NULL);
1796 } 1795 }
1797 /* 1796 /*
@@ -2022,7 +2021,7 @@ xfs_create(
2022 IHOLD(ip); 2021 IHOLD(ip);
2023 vp = XFS_ITOV(ip); 2022 vp = XFS_ITOV(ip);
2024 2023
2025 error = xfs_bmap_finish(&tp, &free_list, first_block, &committed); 2024 error = xfs_bmap_finish(&tp, &free_list, &committed);
2026 if (error) { 2025 if (error) {
2027 xfs_bmap_cancel(&free_list); 2026 xfs_bmap_cancel(&free_list);
2028 goto abort_rele; 2027 goto abort_rele;
@@ -2507,7 +2506,7 @@ xfs_remove(
2507 xfs_trans_set_sync(tp); 2506 xfs_trans_set_sync(tp);
2508 } 2507 }
2509 2508
2510 error = xfs_bmap_finish(&tp, &free_list, first_block, &committed); 2509 error = xfs_bmap_finish(&tp, &free_list, &committed);
2511 if (error) { 2510 if (error) {
2512 REMOVE_DEBUG_TRACE(__LINE__); 2511 REMOVE_DEBUG_TRACE(__LINE__);
2513 goto error_rele; 2512 goto error_rele;
@@ -2715,7 +2714,7 @@ xfs_link(
2715 xfs_trans_set_sync(tp); 2714 xfs_trans_set_sync(tp);
2716 } 2715 }
2717 2716
2718 error = xfs_bmap_finish (&tp, &free_list, first_block, &committed); 2717 error = xfs_bmap_finish (&tp, &free_list, &committed);
2719 if (error) { 2718 if (error) {
2720 xfs_bmap_cancel(&free_list); 2719 xfs_bmap_cancel(&free_list);
2721 goto abort_return; 2720 goto abort_return;
@@ -2932,7 +2931,7 @@ xfs_mkdir(
2932 xfs_trans_set_sync(tp); 2931 xfs_trans_set_sync(tp);
2933 } 2932 }
2934 2933
2935 error = xfs_bmap_finish(&tp, &free_list, first_block, &committed); 2934 error = xfs_bmap_finish(&tp, &free_list, &committed);
2936 if (error) { 2935 if (error) {
2937 IRELE(cdp); 2936 IRELE(cdp);
2938 goto error2; 2937 goto error2;
@@ -3183,7 +3182,7 @@ xfs_rmdir(
3183 xfs_trans_set_sync(tp); 3182 xfs_trans_set_sync(tp);
3184 } 3183 }
3185 3184
3186 error = xfs_bmap_finish (&tp, &free_list, first_block, &committed); 3185 error = xfs_bmap_finish (&tp, &free_list, &committed);
3187 if (error) { 3186 if (error) {
3188 xfs_bmap_cancel(&free_list); 3187 xfs_bmap_cancel(&free_list);
3189 xfs_trans_cancel(tp, (XFS_TRANS_RELEASE_LOG_RES | 3188 xfs_trans_cancel(tp, (XFS_TRANS_RELEASE_LOG_RES |
@@ -3533,7 +3532,7 @@ xfs_symlink(
3533 */ 3532 */
3534 IHOLD(ip); 3533 IHOLD(ip);
3535 3534
3536 error = xfs_bmap_finish(&tp, &free_list, first_block, &committed); 3535 error = xfs_bmap_finish(&tp, &free_list, &committed);
3537 if (error) { 3536 if (error) {
3538 goto error2; 3537 goto error2;
3539 } 3538 }
@@ -4145,7 +4144,7 @@ retry:
4145 /* 4144 /*
4146 * Complete the transaction 4145 * Complete the transaction
4147 */ 4146 */
4148 error = xfs_bmap_finish(&tp, &free_list, firstfsb, &committed); 4147 error = xfs_bmap_finish(&tp, &free_list, &committed);
4149 if (error) { 4148 if (error) {
4150 goto error0; 4149 goto error0;
4151 } 4150 }
@@ -4452,7 +4451,7 @@ xfs_free_file_space(
4452 /* 4451 /*
4453 * complete the transaction 4452 * complete the transaction
4454 */ 4453 */
4455 error = xfs_bmap_finish(&tp, &free_list, firstfsb, &committed); 4454 error = xfs_bmap_finish(&tp, &free_list, &committed);
4456 if (error) { 4455 if (error) {
4457 goto error0; 4456 goto error0;
4458 } 4457 }