aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@sandeen.net>2007-05-07 23:48:42 -0400
committerTim Shimmin <tes@sgi.com>2007-05-07 23:48:42 -0400
commit1c72bf90037f32fc2b10e0a05dff2640abce8ee2 (patch)
tree3903e287eed6b6e942340d01bec360edebff594e
parent5b94f675f57e4ff16c8fda09088d7480a84dcd91 (diff)
[XFS] The last argument "lsn" of xfs_trans_commit() is always called with
NULL. Patch provided by Eric Sandeen. SGI-PV: 961693 SGI-Modid: xfs-linux-melb:xfs-kern:28199a Signed-off-by: Eric Sandeen <sandeen@sandeen.net> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com> Signed-off-by: Tim Shimmin <tes@sgi.com>
-rw-r--r--fs/xfs/quota/xfs_dquot.c3
-rw-r--r--fs/xfs/quota/xfs_qm.c5
-rw-r--r--fs/xfs/quota/xfs_qm_syscalls.c6
-rw-r--r--fs/xfs/xfs_attr.c12
-rw-r--r--fs/xfs/xfs_attr_leaf.c2
-rw-r--r--fs/xfs/xfs_bmap.c4
-rw-r--r--fs/xfs/xfs_dfrag.c2
-rw-r--r--fs/xfs/xfs_fsops.c4
-rw-r--r--fs/xfs/xfs_inode.c2
-rw-r--r--fs/xfs/xfs_iomap.c7
-rw-r--r--fs/xfs/xfs_log_recover.c4
-rw-r--r--fs/xfs/xfs_mount.c2
-rw-r--r--fs/xfs/xfs_qmops.c2
-rw-r--r--fs/xfs/xfs_rename.c2
-rw-r--r--fs/xfs/xfs_rtalloc.c6
-rw-r--r--fs/xfs/xfs_rw.c4
-rw-r--r--fs/xfs/xfs_trans.c6
-rw-r--r--fs/xfs/xfs_trans.h4
-rw-r--r--fs/xfs/xfs_utils.c5
-rw-r--r--fs/xfs/xfs_vfsops.c2
-rw-r--r--fs/xfs/xfs_vnodeops.c33
21 files changed, 50 insertions, 67 deletions
diff --git a/fs/xfs/quota/xfs_dquot.c b/fs/xfs/quota/xfs_dquot.c
index 4adaf13aac6f..cfdd35ee9f7a 100644
--- a/fs/xfs/quota/xfs_dquot.c
+++ b/fs/xfs/quota/xfs_dquot.c
@@ -753,8 +753,7 @@ xfs_qm_idtodq(
753 goto error0; 753 goto error0;
754 } 754 }
755 if (tp) { 755 if (tp) {
756 if ((error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES, 756 if ((error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES)))
757 NULL)))
758 goto error1; 757 goto error1;
759 } 758 }
760 759
diff --git a/fs/xfs/quota/xfs_qm.c b/fs/xfs/quota/xfs_qm.c
index 1de2acdc7f70..762af2d1b50f 100644
--- a/fs/xfs/quota/xfs_qm.c
+++ b/fs/xfs/quota/xfs_qm.c
@@ -1453,8 +1453,7 @@ xfs_qm_qino_alloc(
1453 XFS_SB_UNLOCK(mp, s); 1453 XFS_SB_UNLOCK(mp, s);
1454 xfs_mod_sb(tp, sbfields); 1454 xfs_mod_sb(tp, sbfields);
1455 1455
1456 if ((error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES, 1456 if ((error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES))) {
1457 NULL))) {
1458 xfs_fs_cmn_err(CE_ALERT, mp, "XFS qino_alloc failed!"); 1457 xfs_fs_cmn_err(CE_ALERT, mp, "XFS qino_alloc failed!");
1459 return error; 1458 return error;
1460 } 1459 }
@@ -2405,7 +2404,7 @@ xfs_qm_write_sb_changes(
2405 } 2404 }
2406 2405
2407 xfs_mod_sb(tp, flags); 2406 xfs_mod_sb(tp, flags);
2408 (void) xfs_trans_commit(tp, 0, NULL); 2407 (void) xfs_trans_commit(tp, 0);
2409 2408
2410 return 0; 2409 return 0;
2411} 2410}
diff --git a/fs/xfs/quota/xfs_qm_syscalls.c b/fs/xfs/quota/xfs_qm_syscalls.c
index 716f562aa8b2..44ab68de971d 100644
--- a/fs/xfs/quota/xfs_qm_syscalls.c
+++ b/fs/xfs/quota/xfs_qm_syscalls.c
@@ -735,7 +735,7 @@ xfs_qm_scall_setqlim(
735 xfs_trans_log_dquot(tp, dqp); 735 xfs_trans_log_dquot(tp, dqp);
736 736
737 xfs_dqtrace_entry(dqp, "Q_SETQLIM: COMMIT"); 737 xfs_dqtrace_entry(dqp, "Q_SETQLIM: COMMIT");
738 xfs_trans_commit(tp, 0, NULL); 738 xfs_trans_commit(tp, 0);
739 xfs_qm_dqprint(dqp); 739 xfs_qm_dqprint(dqp);
740 xfs_qm_dqrele(dqp); 740 xfs_qm_dqrele(dqp);
741 mutex_unlock(&(XFS_QI_QOFFLOCK(mp))); 741 mutex_unlock(&(XFS_QI_QOFFLOCK(mp)));
@@ -809,7 +809,7 @@ xfs_qm_log_quotaoff_end(
809 * We don't care about quotoff's performance. 809 * We don't care about quotoff's performance.
810 */ 810 */
811 xfs_trans_set_sync(tp); 811 xfs_trans_set_sync(tp);
812 error = xfs_trans_commit(tp, 0, NULL); 812 error = xfs_trans_commit(tp, 0);
813 return (error); 813 return (error);
814} 814}
815 815
@@ -852,7 +852,7 @@ xfs_qm_log_quotaoff(
852 * We don't care about quotoff's performance. 852 * We don't care about quotoff's performance.
853 */ 853 */
854 xfs_trans_set_sync(tp); 854 xfs_trans_set_sync(tp);
855 error = xfs_trans_commit(tp, 0, NULL); 855 error = xfs_trans_commit(tp, 0);
856 856
857error0: 857error0:
858 if (error) { 858 if (error) {
diff --git a/fs/xfs/xfs_attr.c b/fs/xfs/xfs_attr.c
index 9d358ffce4e5..7ce44a7b88a2 100644
--- a/fs/xfs/xfs_attr.c
+++ b/fs/xfs/xfs_attr.c
@@ -328,8 +328,7 @@ xfs_attr_set_int(xfs_inode_t *dp, const char *name, int namelen,
328 xfs_trans_set_sync(args.trans); 328 xfs_trans_set_sync(args.trans);
329 } 329 }
330 err2 = xfs_trans_commit(args.trans, 330 err2 = xfs_trans_commit(args.trans,
331 XFS_TRANS_RELEASE_LOG_RES, 331 XFS_TRANS_RELEASE_LOG_RES);
332 NULL);
333 xfs_iunlock(dp, XFS_ILOCK_EXCL); 332 xfs_iunlock(dp, XFS_ILOCK_EXCL);
334 333
335 /* 334 /*
@@ -397,8 +396,7 @@ xfs_attr_set_int(xfs_inode_t *dp, const char *name, int namelen,
397 * Commit the last in the sequence of transactions. 396 * Commit the last in the sequence of transactions.
398 */ 397 */
399 xfs_trans_log_inode(args.trans, dp, XFS_ILOG_CORE); 398 xfs_trans_log_inode(args.trans, dp, XFS_ILOG_CORE);
400 error = xfs_trans_commit(args.trans, XFS_TRANS_RELEASE_LOG_RES, 399 error = xfs_trans_commit(args.trans, XFS_TRANS_RELEASE_LOG_RES);
401 NULL);
402 xfs_iunlock(dp, XFS_ILOCK_EXCL); 400 xfs_iunlock(dp, XFS_ILOCK_EXCL);
403 401
404 /* 402 /*
@@ -544,8 +542,7 @@ xfs_attr_remove_int(xfs_inode_t *dp, const char *name, int namelen, int flags)
544 * Commit the last in the sequence of transactions. 542 * Commit the last in the sequence of transactions.
545 */ 543 */
546 xfs_trans_log_inode(args.trans, dp, XFS_ILOG_CORE); 544 xfs_trans_log_inode(args.trans, dp, XFS_ILOG_CORE);
547 error = xfs_trans_commit(args.trans, XFS_TRANS_RELEASE_LOG_RES, 545 error = xfs_trans_commit(args.trans, XFS_TRANS_RELEASE_LOG_RES);
548 NULL);
549 xfs_iunlock(dp, XFS_ILOCK_EXCL); 546 xfs_iunlock(dp, XFS_ILOCK_EXCL);
550 547
551 /* 548 /*
@@ -859,8 +856,7 @@ xfs_attr_inactive(xfs_inode_t *dp)
859 * Commit the last in the sequence of transactions. 856 * Commit the last in the sequence of transactions.
860 */ 857 */
861 xfs_trans_log_inode(trans, dp, XFS_ILOG_CORE); 858 xfs_trans_log_inode(trans, dp, XFS_ILOG_CORE);
862 error = xfs_trans_commit(trans, XFS_TRANS_RELEASE_LOG_RES, 859 error = xfs_trans_commit(trans, XFS_TRANS_RELEASE_LOG_RES);
863 NULL);
864 xfs_iunlock(dp, XFS_ILOCK_EXCL); 860 xfs_iunlock(dp, XFS_ILOCK_EXCL);
865 861
866 return(error); 862 return(error);
diff --git a/fs/xfs/xfs_attr_leaf.c b/fs/xfs/xfs_attr_leaf.c
index 8eab73e8340a..81f45dae1c57 100644
--- a/fs/xfs/xfs_attr_leaf.c
+++ b/fs/xfs/xfs_attr_leaf.c
@@ -3053,7 +3053,7 @@ xfs_attr_rolltrans(xfs_trans_t **transp, xfs_inode_t *dp)
3053 * is in progress. The caller takes the responsibility to cancel 3053 * is in progress. The caller takes the responsibility to cancel
3054 * the duplicate transaction that gets returned. 3054 * the duplicate transaction that gets returned.
3055 */ 3055 */
3056 if ((error = xfs_trans_commit(trans, 0, NULL))) 3056 if ((error = xfs_trans_commit(trans, 0)))
3057 return (error); 3057 return (error);
3058 3058
3059 trans = *transp; 3059 trans = *transp;
diff --git a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c
index 87795188cedf..05d43d112843 100644
--- a/fs/xfs/xfs_bmap.c
+++ b/fs/xfs/xfs_bmap.c
@@ -4071,7 +4071,7 @@ xfs_bmap_add_attrfork(
4071 } 4071 }
4072 if ((error = xfs_bmap_finish(&tp, &flist, &committed))) 4072 if ((error = xfs_bmap_finish(&tp, &flist, &committed)))
4073 goto error2; 4073 goto error2;
4074 error = xfs_trans_commit(tp, XFS_TRANS_PERM_LOG_RES, NULL); 4074 error = xfs_trans_commit(tp, XFS_TRANS_PERM_LOG_RES);
4075 ASSERT(ip->i_df.if_ext_max == 4075 ASSERT(ip->i_df.if_ext_max ==
4076 XFS_IFORK_DSIZE(ip) / (uint)sizeof(xfs_bmbt_rec_t)); 4076 XFS_IFORK_DSIZE(ip) / (uint)sizeof(xfs_bmbt_rec_t));
4077 return error; 4077 return error;
@@ -4227,7 +4227,7 @@ xfs_bmap_finish(
4227 logres = ntp->t_log_res; 4227 logres = ntp->t_log_res;
4228 logcount = ntp->t_log_count; 4228 logcount = ntp->t_log_count;
4229 ntp = xfs_trans_dup(*tp); 4229 ntp = xfs_trans_dup(*tp);
4230 error = xfs_trans_commit(*tp, 0, NULL); 4230 error = xfs_trans_commit(*tp, 0);
4231 *tp = ntp; 4231 *tp = ntp;
4232 *committed = 1; 4232 *committed = 1;
4233 /* 4233 /*
diff --git a/fs/xfs/xfs_dfrag.c b/fs/xfs/xfs_dfrag.c
index b847e6a7a3f0..fb6f22c511e2 100644
--- a/fs/xfs/xfs_dfrag.c
+++ b/fs/xfs/xfs_dfrag.c
@@ -382,7 +382,7 @@ xfs_swap_extents(
382 xfs_trans_set_sync(tp); 382 xfs_trans_set_sync(tp);
383 } 383 }
384 384
385 error = xfs_trans_commit(tp, XFS_TRANS_SWAPEXT, NULL); 385 error = xfs_trans_commit(tp, XFS_TRANS_SWAPEXT);
386 locked = 0; 386 locked = 0;
387 387
388 error0: 388 error0:
diff --git a/fs/xfs/xfs_fsops.c b/fs/xfs/xfs_fsops.c
index 32c37c1c47ab..b599e6be9ec1 100644
--- a/fs/xfs/xfs_fsops.c
+++ b/fs/xfs/xfs_fsops.c
@@ -346,7 +346,7 @@ xfs_growfs_data_private(
346 xfs_trans_mod_sb(tp, XFS_TRANS_SB_FDBLOCKS, nfree); 346 xfs_trans_mod_sb(tp, XFS_TRANS_SB_FDBLOCKS, nfree);
347 if (dpct) 347 if (dpct)
348 xfs_trans_mod_sb(tp, XFS_TRANS_SB_IMAXPCT, dpct); 348 xfs_trans_mod_sb(tp, XFS_TRANS_SB_IMAXPCT, dpct);
349 error = xfs_trans_commit(tp, 0, NULL); 349 error = xfs_trans_commit(tp, 0);
350 if (error) { 350 if (error) {
351 return error; 351 return error;
352 } 352 }
@@ -605,7 +605,7 @@ xfs_fs_log_dummy(
605 xfs_trans_ihold(tp, ip); 605 xfs_trans_ihold(tp, ip);
606 xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); 606 xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
607 xfs_trans_set_sync(tp); 607 xfs_trans_set_sync(tp);
608 xfs_trans_commit(tp, 0, NULL); 608 xfs_trans_commit(tp, 0);
609 609
610 xfs_iunlock(ip, XFS_ILOCK_EXCL); 610 xfs_iunlock(ip, XFS_ILOCK_EXCL);
611} 611}
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index 3da9829c19d5..3541d19859e1 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -1746,7 +1746,7 @@ xfs_itruncate_finish(
1746 xfs_trans_log_inode(ntp, ip, XFS_ILOG_CORE); 1746 xfs_trans_log_inode(ntp, ip, XFS_ILOG_CORE);
1747 } 1747 }
1748 ntp = xfs_trans_dup(ntp); 1748 ntp = xfs_trans_dup(ntp);
1749 (void) xfs_trans_commit(*tp, 0, NULL); 1749 (void) xfs_trans_commit(*tp, 0);
1750 *tp = ntp; 1750 *tp = ntp;
1751 error = xfs_trans_reserve(ntp, 0, XFS_ITRUNCATE_LOG_RES(mp), 0, 1751 error = xfs_trans_reserve(ntp, 0, XFS_ITRUNCATE_LOG_RES(mp), 0,
1752 XFS_TRANS_PERM_LOG_RES, 1752 XFS_TRANS_PERM_LOG_RES,
diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c
index cc6a7b5a9912..cde70e895443 100644
--- a/fs/xfs/xfs_iomap.c
+++ b/fs/xfs/xfs_iomap.c
@@ -543,7 +543,7 @@ xfs_iomap_write_direct(
543 error = xfs_bmap_finish(&tp, &free_list, &committed); 543 error = xfs_bmap_finish(&tp, &free_list, &committed);
544 if (error) 544 if (error)
545 goto error0; 545 goto error0;
546 error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES, NULL); 546 error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES);
547 if (error) 547 if (error)
548 goto error_out; 548 goto error_out;
549 549
@@ -840,8 +840,7 @@ xfs_iomap_write_allocate(
840 if (error) 840 if (error)
841 goto trans_cancel; 841 goto trans_cancel;
842 842
843 error = xfs_trans_commit(tp, 843 error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES);
844 XFS_TRANS_RELEASE_LOG_RES, NULL);
845 if (error) 844 if (error)
846 goto error0; 845 goto error0;
847 846
@@ -948,7 +947,7 @@ xfs_iomap_write_unwritten(
948 if (error) 947 if (error)
949 goto error_on_bmapi_transaction; 948 goto error_on_bmapi_transaction;
950 949
951 error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES, NULL); 950 error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES);
952 xfs_iunlock(ip, XFS_ILOCK_EXCL); 951 xfs_iunlock(ip, XFS_ILOCK_EXCL);
953 if (error) 952 if (error)
954 return XFS_ERROR(error); 953 return XFS_ERROR(error);
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c
index ca74d3f5910e..fcb33438c374 100644
--- a/fs/xfs/xfs_log_recover.c
+++ b/fs/xfs/xfs_log_recover.c
@@ -3016,7 +3016,7 @@ xlog_recover_process_efi(
3016 } 3016 }
3017 3017
3018 efip->efi_flags |= XFS_EFI_RECOVERED; 3018 efip->efi_flags |= XFS_EFI_RECOVERED;
3019 xfs_trans_commit(tp, 0, NULL); 3019 xfs_trans_commit(tp, 0);
3020} 3020}
3021 3021
3022/* 3022/*
@@ -3143,7 +3143,7 @@ xlog_recover_clear_agi_bucket(
3143 xfs_trans_log_buf(tp, agibp, offset, 3143 xfs_trans_log_buf(tp, agibp, offset,
3144 (offset + sizeof(xfs_agino_t) - 1)); 3144 (offset + sizeof(xfs_agino_t) - 1));
3145 3145
3146 (void) xfs_trans_commit(tp, 0, NULL); 3146 (void) xfs_trans_commit(tp, 0);
3147} 3147}
3148 3148
3149/* 3149/*
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c
index 3bed0cf0d8af..f5aa3ef855fb 100644
--- a/fs/xfs/xfs_mount.c
+++ b/fs/xfs/xfs_mount.c
@@ -1653,7 +1653,7 @@ xfs_mount_log_sbunit(
1653 return; 1653 return;
1654 } 1654 }
1655 xfs_mod_sb(tp, fields); 1655 xfs_mod_sb(tp, fields);
1656 xfs_trans_commit(tp, 0, NULL); 1656 xfs_trans_commit(tp, 0);
1657} 1657}
1658 1658
1659 1659
diff --git a/fs/xfs/xfs_qmops.c b/fs/xfs/xfs_qmops.c
index 320d63ff9ca2..0d594ed7efef 100644
--- a/fs/xfs/xfs_qmops.c
+++ b/fs/xfs/xfs_qmops.c
@@ -78,7 +78,7 @@ xfs_mount_reset_sbqflags(xfs_mount_t *mp)
78 return error; 78 return error;
79 } 79 }
80 xfs_mod_sb(tp, XFS_SB_QFLAGS); 80 xfs_mod_sb(tp, XFS_SB_QFLAGS);
81 error = xfs_trans_commit(tp, 0, NULL); 81 error = xfs_trans_commit(tp, 0);
82 return error; 82 return error;
83} 83}
84 84
diff --git a/fs/xfs/xfs_rename.c b/fs/xfs/xfs_rename.c
index 4c6573d784cd..7679d7a7022d 100644
--- a/fs/xfs/xfs_rename.c
+++ b/fs/xfs/xfs_rename.c
@@ -584,7 +584,7 @@ xfs_rename(
584 * trans_commit will unlock src_ip, target_ip & decrement 584 * trans_commit will unlock src_ip, target_ip & decrement
585 * the vnode references. 585 * the vnode references.
586 */ 586 */
587 error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES, NULL); 587 error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES);
588 if (target_ip != NULL) { 588 if (target_ip != NULL) {
589 xfs_refcache_purge_ip(target_ip); 589 xfs_refcache_purge_ip(target_ip);
590 IRELE(target_ip); 590 IRELE(target_ip);
diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c
index 6fff19dc3cf9..b3a5f07bd073 100644
--- a/fs/xfs/xfs_rtalloc.c
+++ b/fs/xfs/xfs_rtalloc.c
@@ -150,7 +150,7 @@ xfs_growfs_rt_alloc(
150 error = xfs_bmap_finish(&tp, &flist, &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);
154 /* 154 /*
155 * Now we need to clear the allocated blocks. 155 * Now we need to clear the allocated blocks.
156 * Do this one block per transaction, to keep it simple. 156 * Do this one block per transaction, to keep it simple.
@@ -187,7 +187,7 @@ xfs_growfs_rt_alloc(
187 /* 187 /*
188 * Commit the transaction. 188 * Commit the transaction.
189 */ 189 */
190 xfs_trans_commit(tp, 0, NULL); 190 xfs_trans_commit(tp, 0);
191 } 191 }
192 /* 192 /*
193 * Go on to the next extent, if any. 193 * Go on to the next extent, if any.
@@ -2042,7 +2042,7 @@ xfs_growfs_rt(
2042 /* 2042 /*
2043 * Commit the transaction. 2043 * Commit the transaction.
2044 */ 2044 */
2045 xfs_trans_commit(tp, 0, NULL); 2045 xfs_trans_commit(tp, 0);
2046 } 2046 }
2047 2047
2048 if (error) 2048 if (error)
diff --git a/fs/xfs/xfs_rw.c b/fs/xfs/xfs_rw.c
index 1ea7c0ca6ae0..905d1c008be7 100644
--- a/fs/xfs/xfs_rw.c
+++ b/fs/xfs/xfs_rw.c
@@ -83,7 +83,7 @@ xfs_write_clear_setuid(
83 } 83 }
84 xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); 84 xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
85 xfs_trans_set_sync(tp); 85 xfs_trans_set_sync(tp);
86 error = xfs_trans_commit(tp, 0, NULL); 86 error = xfs_trans_commit(tp, 0);
87 xfs_iunlock(ip, XFS_ILOCK_EXCL); 87 xfs_iunlock(ip, XFS_ILOCK_EXCL);
88 return 0; 88 return 0;
89} 89}
@@ -164,7 +164,7 @@ xfs_write_sync_logforce(
164 xfs_trans_ihold(tp, ip); 164 xfs_trans_ihold(tp, ip);
165 xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); 165 xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
166 xfs_trans_set_sync(tp); 166 xfs_trans_set_sync(tp);
167 error = xfs_trans_commit(tp, 0, NULL); 167 error = xfs_trans_commit(tp, 0);
168 xfs_iunlock(ip, XFS_ILOCK_EXCL); 168 xfs_iunlock(ip, XFS_ILOCK_EXCL);
169 } 169 }
170 } 170 }
diff --git a/fs/xfs/xfs_trans.c b/fs/xfs/xfs_trans.c
index 301ff9445b6f..cc2d60951e21 100644
--- a/fs/xfs/xfs_trans.c
+++ b/fs/xfs/xfs_trans.c
@@ -753,7 +753,6 @@ int
753_xfs_trans_commit( 753_xfs_trans_commit(
754 xfs_trans_t *tp, 754 xfs_trans_t *tp,
755 uint flags, 755 uint flags,
756 xfs_lsn_t *commit_lsn_p,
757 int *log_flushed) 756 int *log_flushed)
758{ 757{
759 xfs_log_iovec_t *log_vector; 758 xfs_log_iovec_t *log_vector;
@@ -812,8 +811,6 @@ shut_us_down:
812 xfs_trans_free_busy(tp); 811 xfs_trans_free_busy(tp);
813 xfs_trans_free(tp); 812 xfs_trans_free(tp);
814 XFS_STATS_INC(xs_trans_empty); 813 XFS_STATS_INC(xs_trans_empty);
815 if (commit_lsn_p)
816 *commit_lsn_p = commit_lsn;
817 return (shutdown); 814 return (shutdown);
818 } 815 }
819 ASSERT(tp->t_ticket != NULL); 816 ASSERT(tp->t_ticket != NULL);
@@ -864,9 +861,6 @@ shut_us_down:
864 kmem_free(log_vector, nvec * sizeof(xfs_log_iovec_t)); 861 kmem_free(log_vector, nvec * sizeof(xfs_log_iovec_t));
865 } 862 }
866 863
867 if (commit_lsn_p)
868 *commit_lsn_p = commit_lsn;
869
870 /* 864 /*
871 * If we got a log write error. Unpin the logitems that we 865 * If we got a log write error. Unpin the logitems that we
872 * had pinned, clean up, free trans structure, and return error. 866 * had pinned, clean up, free trans structure, and return error.
diff --git a/fs/xfs/xfs_trans.h b/fs/xfs/xfs_trans.h
index f1d7ab236726..7dfcc450366f 100644
--- a/fs/xfs/xfs_trans.h
+++ b/fs/xfs/xfs_trans.h
@@ -988,10 +988,8 @@ void xfs_trans_log_efd_extent(xfs_trans_t *,
988 xfs_extlen_t); 988 xfs_extlen_t);
989int _xfs_trans_commit(xfs_trans_t *, 989int _xfs_trans_commit(xfs_trans_t *,
990 uint flags, 990 uint flags,
991 xfs_lsn_t *,
992 int *); 991 int *);
993#define xfs_trans_commit(tp, flags, lsn) \ 992#define xfs_trans_commit(tp, flags) _xfs_trans_commit(tp, flags, NULL)
994 _xfs_trans_commit(tp, flags, lsn, NULL)
995void xfs_trans_cancel(xfs_trans_t *, int); 993void xfs_trans_cancel(xfs_trans_t *, int);
996void xfs_trans_ail_init(struct xfs_mount *); 994void xfs_trans_ail_init(struct xfs_mount *);
997xfs_lsn_t xfs_trans_push_ail(struct xfs_mount *, xfs_lsn_t); 995xfs_lsn_t xfs_trans_push_ail(struct xfs_mount *, xfs_lsn_t);
diff --git a/fs/xfs/xfs_utils.c b/fs/xfs/xfs_utils.c
index 9014d7e44488..948b0c892e96 100644
--- a/fs/xfs/xfs_utils.c
+++ b/fs/xfs/xfs_utils.c
@@ -222,7 +222,7 @@ xfs_dir_ialloc(
222 } 222 }
223 223
224 ntp = xfs_trans_dup(tp); 224 ntp = xfs_trans_dup(tp);
225 code = xfs_trans_commit(tp, 0, NULL); 225 code = xfs_trans_commit(tp, 0);
226 tp = ntp; 226 tp = ntp;
227 if (committed != NULL) { 227 if (committed != NULL) {
228 *committed = 1; 228 *committed = 1;
@@ -460,8 +460,7 @@ xfs_truncate_file(
460 XFS_TRANS_ABORT); 460 XFS_TRANS_ABORT);
461 } else { 461 } else {
462 xfs_ichgtime(ip, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG); 462 xfs_ichgtime(ip, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG);
463 error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES, 463 error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES);
464 NULL);
465 } 464 }
466 xfs_iunlock(ip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL); 465 xfs_iunlock(ip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
467 466
diff --git a/fs/xfs/xfs_vfsops.c b/fs/xfs/xfs_vfsops.c
index 29f72f613782..22a09273748f 100644
--- a/fs/xfs/xfs_vfsops.c
+++ b/fs/xfs/xfs_vfsops.c
@@ -1539,7 +1539,7 @@ xfs_syncsub(
1539 xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL); 1539 xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL);
1540 xfs_trans_ihold(tp, ip); 1540 xfs_trans_ihold(tp, ip);
1541 xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); 1541 xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
1542 error = xfs_trans_commit(tp, 0, NULL); 1542 error = xfs_trans_commit(tp, 0);
1543 xfs_iunlock(ip, XFS_ILOCK_EXCL); 1543 xfs_iunlock(ip, XFS_ILOCK_EXCL);
1544 xfs_log_force(mp, (xfs_lsn_t)0, log_flags); 1544 xfs_log_force(mp, (xfs_lsn_t)0, log_flags);
1545 } 1545 }
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c
index 52c41714ec54..6202a9318a76 100644
--- a/fs/xfs/xfs_vnodeops.c
+++ b/fs/xfs/xfs_vnodeops.c
@@ -873,7 +873,7 @@ xfs_setattr(
873 if (mp->m_flags & XFS_MOUNT_WSYNC) 873 if (mp->m_flags & XFS_MOUNT_WSYNC)
874 xfs_trans_set_sync(tp); 874 xfs_trans_set_sync(tp);
875 875
876 code = xfs_trans_commit(tp, commit_flags, NULL); 876 code = xfs_trans_commit(tp, commit_flags);
877 } 877 }
878 878
879 /* 879 /*
@@ -1176,7 +1176,7 @@ xfs_fsync(
1176 xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); 1176 xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
1177 if (flag & FSYNC_WAIT) 1177 if (flag & FSYNC_WAIT)
1178 xfs_trans_set_sync(tp); 1178 xfs_trans_set_sync(tp);
1179 error = _xfs_trans_commit(tp, 0, NULL, &log_flushed); 1179 error = _xfs_trans_commit(tp, 0, &log_flushed);
1180 1180
1181 xfs_iunlock(ip, XFS_ILOCK_EXCL); 1181 xfs_iunlock(ip, XFS_ILOCK_EXCL);
1182 } 1182 }
@@ -1291,8 +1291,7 @@ xfs_inactive_free_eofblocks(
1291 XFS_TRANS_ABORT)); 1291 XFS_TRANS_ABORT));
1292 } else { 1292 } else {
1293 error = xfs_trans_commit(tp, 1293 error = xfs_trans_commit(tp,
1294 XFS_TRANS_RELEASE_LOG_RES, 1294 XFS_TRANS_RELEASE_LOG_RES);
1295 NULL);
1296 } 1295 }
1297 xfs_iunlock(ip, XFS_IOLOCK_EXCL | XFS_ILOCK_EXCL); 1296 xfs_iunlock(ip, XFS_IOLOCK_EXCL | XFS_ILOCK_EXCL);
1298 } 1297 }
@@ -1406,7 +1405,7 @@ xfs_inactive_symlink_rmt(
1406 * we need to unlock the inode since the new transaction doesn't 1405 * we need to unlock the inode since the new transaction doesn't
1407 * have the inode attached. 1406 * have the inode attached.
1408 */ 1407 */
1409 error = xfs_trans_commit(tp, 0, NULL); 1408 error = xfs_trans_commit(tp, 0);
1410 tp = ntp; 1409 tp = ntp;
1411 if (error) { 1410 if (error) {
1412 ASSERT(XFS_FORCED_SHUTDOWN(mp)); 1411 ASSERT(XFS_FORCED_SHUTDOWN(mp));
@@ -1503,7 +1502,7 @@ xfs_inactive_attrs(
1503 tp = *tpp; 1502 tp = *tpp;
1504 mp = ip->i_mount; 1503 mp = ip->i_mount;
1505 ASSERT(ip->i_d.di_forkoff != 0); 1504 ASSERT(ip->i_d.di_forkoff != 0);
1506 xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES, NULL); 1505 xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES);
1507 xfs_iunlock(ip, XFS_ILOCK_EXCL); 1506 xfs_iunlock(ip, XFS_ILOCK_EXCL);
1508 1507
1509 error = xfs_attr_inactive(ip); 1508 error = xfs_attr_inactive(ip);
@@ -1790,7 +1789,7 @@ xfs_inactive(
1790 * nothing we can do except to try to keep going. 1789 * nothing we can do except to try to keep going.
1791 */ 1790 */
1792 (void) xfs_bmap_finish(&tp, &free_list, &committed); 1791 (void) xfs_bmap_finish(&tp, &free_list, &committed);
1793 (void) xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES, NULL); 1792 (void) xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES);
1794 } 1793 }
1795 /* 1794 /*
1796 * Release the dquots held by inode, if any. 1795 * Release the dquots held by inode, if any.
@@ -2026,7 +2025,7 @@ xfs_create(
2026 goto abort_rele; 2025 goto abort_rele;
2027 } 2026 }
2028 2027
2029 error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES, NULL); 2028 error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES);
2030 if (error) { 2029 if (error) {
2031 IRELE(ip); 2030 IRELE(ip);
2032 tp = NULL; 2031 tp = NULL;
@@ -2511,7 +2510,7 @@ xfs_remove(
2511 goto error_rele; 2510 goto error_rele;
2512 } 2511 }
2513 2512
2514 error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES, NULL); 2513 error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES);
2515 if (error) { 2514 if (error) {
2516 IRELE(ip); 2515 IRELE(ip);
2517 goto std_return; 2516 goto std_return;
@@ -2719,7 +2718,7 @@ xfs_link(
2719 goto abort_return; 2718 goto abort_return;
2720 } 2719 }
2721 2720
2722 error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES, NULL); 2721 error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES);
2723 if (error) 2722 if (error)
2724 goto std_return; 2723 goto std_return;
2725 2724
@@ -2936,7 +2935,7 @@ xfs_mkdir(
2936 goto error2; 2935 goto error2;
2937 } 2936 }
2938 2937
2939 error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES, NULL); 2938 error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES);
2940 XFS_QM_DQRELE(mp, udqp); 2939 XFS_QM_DQRELE(mp, udqp);
2941 XFS_QM_DQRELE(mp, gdqp); 2940 XFS_QM_DQRELE(mp, gdqp);
2942 if (error) { 2941 if (error) {
@@ -3190,7 +3189,7 @@ xfs_rmdir(
3190 goto std_return; 3189 goto std_return;
3191 } 3190 }
3192 3191
3193 error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES, NULL); 3192 error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES);
3194 if (error) { 3193 if (error) {
3195 IRELE(cdp); 3194 IRELE(cdp);
3196 goto std_return; 3195 goto std_return;
@@ -3535,7 +3534,7 @@ xfs_symlink(
3535 if (error) { 3534 if (error) {
3536 goto error2; 3535 goto error2;
3537 } 3536 }
3538 error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES, NULL); 3537 error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES);
3539 XFS_QM_DQRELE(mp, udqp); 3538 XFS_QM_DQRELE(mp, udqp);
3540 XFS_QM_DQRELE(mp, gdqp); 3539 XFS_QM_DQRELE(mp, gdqp);
3541 3540
@@ -3790,7 +3789,7 @@ xfs_set_dmattrs (
3790 3789
3791 xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); 3790 xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
3792 IHOLD(ip); 3791 IHOLD(ip);
3793 error = xfs_trans_commit(tp, 0, NULL); 3792 error = xfs_trans_commit(tp, 0);
3794 3793
3795 return error; 3794 return error;
3796} 3795}
@@ -4148,7 +4147,7 @@ retry:
4148 goto error0; 4147 goto error0;
4149 } 4148 }
4150 4149
4151 error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES, NULL); 4150 error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES);
4152 xfs_iunlock(ip, XFS_ILOCK_EXCL); 4151 xfs_iunlock(ip, XFS_ILOCK_EXCL);
4153 if (error) { 4152 if (error) {
4154 break; 4153 break;
@@ -4455,7 +4454,7 @@ xfs_free_file_space(
4455 goto error0; 4454 goto error0;
4456 } 4455 }
4457 4456
4458 error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES, NULL); 4457 error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES);
4459 xfs_iunlock(ip, XFS_ILOCK_EXCL); 4458 xfs_iunlock(ip, XFS_ILOCK_EXCL);
4460 } 4459 }
4461 4460
@@ -4649,7 +4648,7 @@ xfs_change_file_space(
4649 xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); 4648 xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
4650 xfs_trans_set_sync(tp); 4649 xfs_trans_set_sync(tp);
4651 4650
4652 error = xfs_trans_commit(tp, 0, NULL); 4651 error = xfs_trans_commit(tp, 0);
4653 4652
4654 xfs_iunlock(ip, XFS_ILOCK_EXCL); 4653 xfs_iunlock(ip, XFS_ILOCK_EXCL);
4655 4654