summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-06-28 22:27:32 -0400
committerDarrick J. Wong <darrick.wong@oracle.com>2019-06-28 22:27:32 -0400
commitddf92053e45c0e07dcb031b56512d52f98cde517 (patch)
tree02bf25137c5510c16161b4084c58a7386faa8595
parent195cd83d1b8835a2f344ed411b46bba48ddfcc49 (diff)
xfs: split iop_unlock
The iop_unlock method is called when comitting or cancelling a transaction. In the latter case, the transaction may or may not be aborted. While there is no known problem with the current code in practice, this implementation is limited in that any log item implementation that might want to differentiate between a commit and a cancellation must rely on the aborted state. The aborted bit is only set when the cancelled transaction is dirty, however. This means that there is no way to distinguish between a commit and a clean transaction cancellation. For example, intent log items currently rely on this distinction. The log item is either transferred to the CIL on commit or released on transaction cancel. There is currently no possibility for a clean intent log item in a transaction, but if that state is ever introduced a cancel of such a transaction will immediately result in memory leaks of the associated log item(s). This is an interface deficiency and landmine. To clean this up, replace the iop_unlock method with an iop_release method that is specific to transaction cancel. The existing iop_committing method occurs at the same time as iop_unlock in the commit path and there is no need for two separate callbacks here. Overload the iop_committing method with the current commit time iop_unlock implementations to eliminate the need for the latter and further simplify the interface. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
-rw-r--r--fs/xfs/xfs_bmap_item.c17
-rw-r--r--fs/xfs/xfs_buf_item.c15
-rw-r--r--fs/xfs/xfs_dquot_item.c19
-rw-r--r--fs/xfs/xfs_extfree_item.c17
-rw-r--r--fs/xfs/xfs_icreate_item.c10
-rw-r--r--fs/xfs/xfs_inode_item.c11
-rw-r--r--fs/xfs/xfs_log_cil.c2
-rw-r--r--fs/xfs/xfs_refcount_item.c17
-rw-r--r--fs/xfs/xfs_rmap_item.c17
-rw-r--r--fs/xfs/xfs_trace.h2
-rw-r--r--fs/xfs/xfs_trans.c7
-rw-r--r--fs/xfs/xfs_trans.h4
-rw-r--r--fs/xfs/xfs_trans_buf.c2
13 files changed, 67 insertions, 73 deletions
diff --git a/fs/xfs/xfs_bmap_item.c b/fs/xfs/xfs_bmap_item.c
index b2395cb1674c..bb5fff120ef5 100644
--- a/fs/xfs/xfs_bmap_item.c
+++ b/fs/xfs/xfs_bmap_item.c
@@ -120,11 +120,10 @@ xfs_bui_item_unpin(
120 * constructed and thus we free the BUI here directly. 120 * constructed and thus we free the BUI here directly.
121 */ 121 */
122STATIC void 122STATIC void
123xfs_bui_item_unlock( 123xfs_bui_item_release(
124 struct xfs_log_item *lip) 124 struct xfs_log_item *lip)
125{ 125{
126 if (test_bit(XFS_LI_ABORTED, &lip->li_flags)) 126 xfs_bui_release(BUI_ITEM(lip));
127 xfs_bui_release(BUI_ITEM(lip));
128} 127}
129 128
130/* 129/*
@@ -134,7 +133,7 @@ static const struct xfs_item_ops xfs_bui_item_ops = {
134 .iop_size = xfs_bui_item_size, 133 .iop_size = xfs_bui_item_size,
135 .iop_format = xfs_bui_item_format, 134 .iop_format = xfs_bui_item_format,
136 .iop_unpin = xfs_bui_item_unpin, 135 .iop_unpin = xfs_bui_item_unpin,
137 .iop_unlock = xfs_bui_item_unlock, 136 .iop_release = xfs_bui_item_release,
138}; 137};
139 138
140/* 139/*
@@ -201,15 +200,13 @@ xfs_bud_item_format(
201 * BUD. 200 * BUD.
202 */ 201 */
203STATIC void 202STATIC void
204xfs_bud_item_unlock( 203xfs_bud_item_release(
205 struct xfs_log_item *lip) 204 struct xfs_log_item *lip)
206{ 205{
207 struct xfs_bud_log_item *budp = BUD_ITEM(lip); 206 struct xfs_bud_log_item *budp = BUD_ITEM(lip);
208 207
209 if (test_bit(XFS_LI_ABORTED, &lip->li_flags)) { 208 xfs_bui_release(budp->bud_buip);
210 xfs_bui_release(budp->bud_buip); 209 kmem_zone_free(xfs_bud_zone, budp);
211 kmem_zone_free(xfs_bud_zone, budp);
212 }
213} 210}
214 211
215/* 212/*
@@ -243,7 +240,7 @@ xfs_bud_item_committed(
243static const struct xfs_item_ops xfs_bud_item_ops = { 240static const struct xfs_item_ops xfs_bud_item_ops = {
244 .iop_size = xfs_bud_item_size, 241 .iop_size = xfs_bud_item_size,
245 .iop_format = xfs_bud_item_format, 242 .iop_format = xfs_bud_item_format,
246 .iop_unlock = xfs_bud_item_unlock, 243 .iop_release = xfs_bud_item_release,
247 .iop_committed = xfs_bud_item_committed, 244 .iop_committed = xfs_bud_item_committed,
248}; 245};
249 246
diff --git a/fs/xfs/xfs_buf_item.c b/fs/xfs/xfs_buf_item.c
index b6c684ea56c1..e9da8274bf31 100644
--- a/fs/xfs/xfs_buf_item.c
+++ b/fs/xfs/xfs_buf_item.c
@@ -595,7 +595,7 @@ xfs_buf_item_put(
595 * free the item. 595 * free the item.
596 */ 596 */
597STATIC void 597STATIC void
598xfs_buf_item_unlock( 598xfs_buf_item_release(
599 struct xfs_log_item *lip) 599 struct xfs_log_item *lip)
600{ 600{
601 struct xfs_buf_log_item *bip = BUF_ITEM(lip); 601 struct xfs_buf_log_item *bip = BUF_ITEM(lip);
@@ -610,7 +610,7 @@ xfs_buf_item_unlock(
610 &lip->li_flags); 610 &lip->li_flags);
611#endif 611#endif
612 612
613 trace_xfs_buf_item_unlock(bip); 613 trace_xfs_buf_item_release(bip);
614 614
615 /* 615 /*
616 * The bli dirty state should match whether the blf has logged segments 616 * The bli dirty state should match whether the blf has logged segments
@@ -640,6 +640,14 @@ xfs_buf_item_unlock(
640 xfs_buf_relse(bp); 640 xfs_buf_relse(bp);
641} 641}
642 642
643STATIC void
644xfs_buf_item_committing(
645 struct xfs_log_item *lip,
646 xfs_lsn_t commit_lsn)
647{
648 return xfs_buf_item_release(lip);
649}
650
643/* 651/*
644 * This is called to find out where the oldest active copy of the 652 * This is called to find out where the oldest active copy of the
645 * buf log item in the on disk log resides now that the last log 653 * buf log item in the on disk log resides now that the last log
@@ -680,7 +688,8 @@ static const struct xfs_item_ops xfs_buf_item_ops = {
680 .iop_format = xfs_buf_item_format, 688 .iop_format = xfs_buf_item_format,
681 .iop_pin = xfs_buf_item_pin, 689 .iop_pin = xfs_buf_item_pin,
682 .iop_unpin = xfs_buf_item_unpin, 690 .iop_unpin = xfs_buf_item_unpin,
683 .iop_unlock = xfs_buf_item_unlock, 691 .iop_release = xfs_buf_item_release,
692 .iop_committing = xfs_buf_item_committing,
684 .iop_committed = xfs_buf_item_committed, 693 .iop_committed = xfs_buf_item_committed,
685 .iop_push = xfs_buf_item_push, 694 .iop_push = xfs_buf_item_push,
686}; 695};
diff --git a/fs/xfs/xfs_dquot_item.c b/fs/xfs/xfs_dquot_item.c
index 98b0d732ef53..334f6ca1cefc 100644
--- a/fs/xfs/xfs_dquot_item.c
+++ b/fs/xfs/xfs_dquot_item.c
@@ -198,14 +198,8 @@ out_unlock:
198 return rval; 198 return rval;
199} 199}
200 200
201/*
202 * Unlock the dquot associated with the log item.
203 * Clear the fields of the dquot and dquot log item that
204 * are specific to the current transaction. If the
205 * hold flags is set, do not unlock the dquot.
206 */
207STATIC void 201STATIC void
208xfs_qm_dquot_logitem_unlock( 202xfs_qm_dquot_logitem_release(
209 struct xfs_log_item *lip) 203 struct xfs_log_item *lip)
210{ 204{
211 struct xfs_dquot *dqp = DQUOT_ITEM(lip)->qli_dquot; 205 struct xfs_dquot *dqp = DQUOT_ITEM(lip)->qli_dquot;
@@ -221,6 +215,14 @@ xfs_qm_dquot_logitem_unlock(
221 xfs_dqunlock(dqp); 215 xfs_dqunlock(dqp);
222} 216}
223 217
218STATIC void
219xfs_qm_dquot_logitem_committing(
220 struct xfs_log_item *lip,
221 xfs_lsn_t commit_lsn)
222{
223 return xfs_qm_dquot_logitem_release(lip);
224}
225
224/* 226/*
225 * This is the ops vector for dquots 227 * This is the ops vector for dquots
226 */ 228 */
@@ -229,7 +231,8 @@ static const struct xfs_item_ops xfs_dquot_item_ops = {
229 .iop_format = xfs_qm_dquot_logitem_format, 231 .iop_format = xfs_qm_dquot_logitem_format,
230 .iop_pin = xfs_qm_dquot_logitem_pin, 232 .iop_pin = xfs_qm_dquot_logitem_pin,
231 .iop_unpin = xfs_qm_dquot_logitem_unpin, 233 .iop_unpin = xfs_qm_dquot_logitem_unpin,
232 .iop_unlock = xfs_qm_dquot_logitem_unlock, 234 .iop_release = xfs_qm_dquot_logitem_release,
235 .iop_committing = xfs_qm_dquot_logitem_committing,
233 .iop_push = xfs_qm_dquot_logitem_push, 236 .iop_push = xfs_qm_dquot_logitem_push,
234 .iop_error = xfs_dquot_item_error 237 .iop_error = xfs_dquot_item_error
235}; 238};
diff --git a/fs/xfs/xfs_extfree_item.c b/fs/xfs/xfs_extfree_item.c
index c1ab3a056bb8..70df19007995 100644
--- a/fs/xfs/xfs_extfree_item.c
+++ b/fs/xfs/xfs_extfree_item.c
@@ -130,11 +130,10 @@ xfs_efi_item_unpin(
130 * constructed and thus we free the EFI here directly. 130 * constructed and thus we free the EFI here directly.
131 */ 131 */
132STATIC void 132STATIC void
133xfs_efi_item_unlock( 133xfs_efi_item_release(
134 struct xfs_log_item *lip) 134 struct xfs_log_item *lip)
135{ 135{
136 if (test_bit(XFS_LI_ABORTED, &lip->li_flags)) 136 xfs_efi_release(EFI_ITEM(lip));
137 xfs_efi_release(EFI_ITEM(lip));
138} 137}
139 138
140/* 139/*
@@ -144,7 +143,7 @@ static const struct xfs_item_ops xfs_efi_item_ops = {
144 .iop_size = xfs_efi_item_size, 143 .iop_size = xfs_efi_item_size,
145 .iop_format = xfs_efi_item_format, 144 .iop_format = xfs_efi_item_format,
146 .iop_unpin = xfs_efi_item_unpin, 145 .iop_unpin = xfs_efi_item_unpin,
147 .iop_unlock = xfs_efi_item_unlock, 146 .iop_release = xfs_efi_item_release,
148}; 147};
149 148
150 149
@@ -300,15 +299,13 @@ xfs_efd_item_format(
300 * the transaction is cancelled, drop our reference to the EFI and free the EFD. 299 * the transaction is cancelled, drop our reference to the EFI and free the EFD.
301 */ 300 */
302STATIC void 301STATIC void
303xfs_efd_item_unlock( 302xfs_efd_item_release(
304 struct xfs_log_item *lip) 303 struct xfs_log_item *lip)
305{ 304{
306 struct xfs_efd_log_item *efdp = EFD_ITEM(lip); 305 struct xfs_efd_log_item *efdp = EFD_ITEM(lip);
307 306
308 if (test_bit(XFS_LI_ABORTED, &lip->li_flags)) { 307 xfs_efi_release(efdp->efd_efip);
309 xfs_efi_release(efdp->efd_efip); 308 xfs_efd_item_free(efdp);
310 xfs_efd_item_free(efdp);
311 }
312} 309}
313 310
314/* 311/*
@@ -342,7 +339,7 @@ xfs_efd_item_committed(
342static const struct xfs_item_ops xfs_efd_item_ops = { 339static const struct xfs_item_ops xfs_efd_item_ops = {
343 .iop_size = xfs_efd_item_size, 340 .iop_size = xfs_efd_item_size,
344 .iop_format = xfs_efd_item_format, 341 .iop_format = xfs_efd_item_format,
345 .iop_unlock = xfs_efd_item_unlock, 342 .iop_release = xfs_efd_item_release,
346 .iop_committed = xfs_efd_item_committed, 343 .iop_committed = xfs_efd_item_committed,
347}; 344};
348 345
diff --git a/fs/xfs/xfs_icreate_item.c b/fs/xfs/xfs_icreate_item.c
index cbaabc55f0c9..9aceb35dce24 100644
--- a/fs/xfs/xfs_icreate_item.c
+++ b/fs/xfs/xfs_icreate_item.c
@@ -57,14 +57,10 @@ xfs_icreate_item_format(
57} 57}
58 58
59STATIC void 59STATIC void
60xfs_icreate_item_unlock( 60xfs_icreate_item_release(
61 struct xfs_log_item *lip) 61 struct xfs_log_item *lip)
62{ 62{
63 struct xfs_icreate_item *icp = ICR_ITEM(lip); 63 kmem_zone_free(xfs_icreate_zone, ICR_ITEM(lip));
64
65 if (test_bit(XFS_LI_ABORTED, &lip->li_flags))
66 kmem_zone_free(xfs_icreate_zone, icp);
67 return;
68} 64}
69 65
70/* 66/*
@@ -89,7 +85,7 @@ xfs_icreate_item_committed(
89static const struct xfs_item_ops xfs_icreate_item_ops = { 85static const struct xfs_item_ops xfs_icreate_item_ops = {
90 .iop_size = xfs_icreate_item_size, 86 .iop_size = xfs_icreate_item_size,
91 .iop_format = xfs_icreate_item_format, 87 .iop_format = xfs_icreate_item_format,
92 .iop_unlock = xfs_icreate_item_unlock, 88 .iop_release = xfs_icreate_item_release,
93 .iop_committed = xfs_icreate_item_committed, 89 .iop_committed = xfs_icreate_item_committed,
94}; 90};
95 91
diff --git a/fs/xfs/xfs_inode_item.c b/fs/xfs/xfs_inode_item.c
index 957f3dca0d7a..e152b3bb3272 100644
--- a/fs/xfs/xfs_inode_item.c
+++ b/fs/xfs/xfs_inode_item.c
@@ -566,7 +566,7 @@ out_unlock:
566 * Unlock the inode associated with the inode log item. 566 * Unlock the inode associated with the inode log item.
567 */ 567 */
568STATIC void 568STATIC void
569xfs_inode_item_unlock( 569xfs_inode_item_release(
570 struct xfs_log_item *lip) 570 struct xfs_log_item *lip)
571{ 571{
572 struct xfs_inode_log_item *iip = INODE_ITEM(lip); 572 struct xfs_inode_log_item *iip = INODE_ITEM(lip);
@@ -622,9 +622,10 @@ xfs_inode_item_committed(
622STATIC void 622STATIC void
623xfs_inode_item_committing( 623xfs_inode_item_committing(
624 struct xfs_log_item *lip, 624 struct xfs_log_item *lip,
625 xfs_lsn_t lsn) 625 xfs_lsn_t commit_lsn)
626{ 626{
627 INODE_ITEM(lip)->ili_last_lsn = lsn; 627 INODE_ITEM(lip)->ili_last_lsn = commit_lsn;
628 return xfs_inode_item_release(lip);
628} 629}
629 630
630/* 631/*
@@ -635,10 +636,10 @@ static const struct xfs_item_ops xfs_inode_item_ops = {
635 .iop_format = xfs_inode_item_format, 636 .iop_format = xfs_inode_item_format,
636 .iop_pin = xfs_inode_item_pin, 637 .iop_pin = xfs_inode_item_pin,
637 .iop_unpin = xfs_inode_item_unpin, 638 .iop_unpin = xfs_inode_item_unpin,
638 .iop_unlock = xfs_inode_item_unlock, 639 .iop_release = xfs_inode_item_release,
639 .iop_committed = xfs_inode_item_committed, 640 .iop_committed = xfs_inode_item_committed,
640 .iop_push = xfs_inode_item_push, 641 .iop_push = xfs_inode_item_push,
641 .iop_committing = xfs_inode_item_committing, 642 .iop_committing = xfs_inode_item_committing,
642 .iop_error = xfs_inode_item_error 643 .iop_error = xfs_inode_item_error
643}; 644};
644 645
diff --git a/fs/xfs/xfs_log_cil.c b/fs/xfs/xfs_log_cil.c
index c856bfce5bf2..4cb459f21ad4 100644
--- a/fs/xfs/xfs_log_cil.c
+++ b/fs/xfs/xfs_log_cil.c
@@ -1024,8 +1024,6 @@ xfs_log_commit_cil(
1024 xfs_trans_del_item(lip); 1024 xfs_trans_del_item(lip);
1025 if (lip->li_ops->iop_committing) 1025 if (lip->li_ops->iop_committing)
1026 lip->li_ops->iop_committing(lip, xc_commit_lsn); 1026 lip->li_ops->iop_committing(lip, xc_commit_lsn);
1027 if (lip->li_ops->iop_unlock)
1028 lip->li_ops->iop_unlock(lip);
1029 } 1027 }
1030 xlog_cil_push_background(log); 1028 xlog_cil_push_background(log);
1031 1029
diff --git a/fs/xfs/xfs_refcount_item.c b/fs/xfs/xfs_refcount_item.c
index 03a61886fe2a..9f8fb23dcc81 100644
--- a/fs/xfs/xfs_refcount_item.c
+++ b/fs/xfs/xfs_refcount_item.c
@@ -118,11 +118,10 @@ xfs_cui_item_unpin(
118 * constructed and thus we free the CUI here directly. 118 * constructed and thus we free the CUI here directly.
119 */ 119 */
120STATIC void 120STATIC void
121xfs_cui_item_unlock( 121xfs_cui_item_release(
122 struct xfs_log_item *lip) 122 struct xfs_log_item *lip)
123{ 123{
124 if (test_bit(XFS_LI_ABORTED, &lip->li_flags)) 124 xfs_cui_release(CUI_ITEM(lip));
125 xfs_cui_release(CUI_ITEM(lip));
126} 125}
127 126
128/* 127/*
@@ -132,7 +131,7 @@ static const struct xfs_item_ops xfs_cui_item_ops = {
132 .iop_size = xfs_cui_item_size, 131 .iop_size = xfs_cui_item_size,
133 .iop_format = xfs_cui_item_format, 132 .iop_format = xfs_cui_item_format,
134 .iop_unpin = xfs_cui_item_unpin, 133 .iop_unpin = xfs_cui_item_unpin,
135 .iop_unlock = xfs_cui_item_unlock, 134 .iop_release = xfs_cui_item_release,
136}; 135};
137 136
138/* 137/*
@@ -205,15 +204,13 @@ xfs_cud_item_format(
205 * CUD. 204 * CUD.
206 */ 205 */
207STATIC void 206STATIC void
208xfs_cud_item_unlock( 207xfs_cud_item_release(
209 struct xfs_log_item *lip) 208 struct xfs_log_item *lip)
210{ 209{
211 struct xfs_cud_log_item *cudp = CUD_ITEM(lip); 210 struct xfs_cud_log_item *cudp = CUD_ITEM(lip);
212 211
213 if (test_bit(XFS_LI_ABORTED, &lip->li_flags)) { 212 xfs_cui_release(cudp->cud_cuip);
214 xfs_cui_release(cudp->cud_cuip); 213 kmem_zone_free(xfs_cud_zone, cudp);
215 kmem_zone_free(xfs_cud_zone, cudp);
216 }
217} 214}
218 215
219/* 216/*
@@ -247,7 +244,7 @@ xfs_cud_item_committed(
247static const struct xfs_item_ops xfs_cud_item_ops = { 244static const struct xfs_item_ops xfs_cud_item_ops = {
248 .iop_size = xfs_cud_item_size, 245 .iop_size = xfs_cud_item_size,
249 .iop_format = xfs_cud_item_format, 246 .iop_format = xfs_cud_item_format,
250 .iop_unlock = xfs_cud_item_unlock, 247 .iop_release = xfs_cud_item_release,
251 .iop_committed = xfs_cud_item_committed, 248 .iop_committed = xfs_cud_item_committed,
252}; 249};
253 250
diff --git a/fs/xfs/xfs_rmap_item.c b/fs/xfs/xfs_rmap_item.c
index df9f2505c5f3..e907bd169de5 100644
--- a/fs/xfs/xfs_rmap_item.c
+++ b/fs/xfs/xfs_rmap_item.c
@@ -117,11 +117,10 @@ xfs_rui_item_unpin(
117 * constructed and thus we free the RUI here directly. 117 * constructed and thus we free the RUI here directly.
118 */ 118 */
119STATIC void 119STATIC void
120xfs_rui_item_unlock( 120xfs_rui_item_release(
121 struct xfs_log_item *lip) 121 struct xfs_log_item *lip)
122{ 122{
123 if (test_bit(XFS_LI_ABORTED, &lip->li_flags)) 123 xfs_rui_release(RUI_ITEM(lip));
124 xfs_rui_release(RUI_ITEM(lip));
125} 124}
126 125
127/* 126/*
@@ -131,7 +130,7 @@ static const struct xfs_item_ops xfs_rui_item_ops = {
131 .iop_size = xfs_rui_item_size, 130 .iop_size = xfs_rui_item_size,
132 .iop_format = xfs_rui_item_format, 131 .iop_format = xfs_rui_item_format,
133 .iop_unpin = xfs_rui_item_unpin, 132 .iop_unpin = xfs_rui_item_unpin,
134 .iop_unlock = xfs_rui_item_unlock, 133 .iop_release = xfs_rui_item_release,
135}; 134};
136 135
137/* 136/*
@@ -226,15 +225,13 @@ xfs_rud_item_format(
226 * RUD. 225 * RUD.
227 */ 226 */
228STATIC void 227STATIC void
229xfs_rud_item_unlock( 228xfs_rud_item_release(
230 struct xfs_log_item *lip) 229 struct xfs_log_item *lip)
231{ 230{
232 struct xfs_rud_log_item *rudp = RUD_ITEM(lip); 231 struct xfs_rud_log_item *rudp = RUD_ITEM(lip);
233 232
234 if (test_bit(XFS_LI_ABORTED, &lip->li_flags)) { 233 xfs_rui_release(rudp->rud_ruip);
235 xfs_rui_release(rudp->rud_ruip); 234 kmem_zone_free(xfs_rud_zone, rudp);
236 kmem_zone_free(xfs_rud_zone, rudp);
237 }
238} 235}
239 236
240/* 237/*
@@ -268,7 +265,7 @@ xfs_rud_item_committed(
268static const struct xfs_item_ops xfs_rud_item_ops = { 265static const struct xfs_item_ops xfs_rud_item_ops = {
269 .iop_size = xfs_rud_item_size, 266 .iop_size = xfs_rud_item_size,
270 .iop_format = xfs_rud_item_format, 267 .iop_format = xfs_rud_item_format,
271 .iop_unlock = xfs_rud_item_unlock, 268 .iop_release = xfs_rud_item_release,
272 .iop_committed = xfs_rud_item_committed, 269 .iop_committed = xfs_rud_item_committed,
273}; 270};
274 271
diff --git a/fs/xfs/xfs_trace.h b/fs/xfs/xfs_trace.h
index 195a9cdb954e..65c920554b96 100644
--- a/fs/xfs/xfs_trace.h
+++ b/fs/xfs/xfs_trace.h
@@ -475,7 +475,7 @@ DEFINE_BUF_ITEM_EVENT(xfs_buf_item_ordered);
475DEFINE_BUF_ITEM_EVENT(xfs_buf_item_pin); 475DEFINE_BUF_ITEM_EVENT(xfs_buf_item_pin);
476DEFINE_BUF_ITEM_EVENT(xfs_buf_item_unpin); 476DEFINE_BUF_ITEM_EVENT(xfs_buf_item_unpin);
477DEFINE_BUF_ITEM_EVENT(xfs_buf_item_unpin_stale); 477DEFINE_BUF_ITEM_EVENT(xfs_buf_item_unpin_stale);
478DEFINE_BUF_ITEM_EVENT(xfs_buf_item_unlock); 478DEFINE_BUF_ITEM_EVENT(xfs_buf_item_release);
479DEFINE_BUF_ITEM_EVENT(xfs_buf_item_committed); 479DEFINE_BUF_ITEM_EVENT(xfs_buf_item_committed);
480DEFINE_BUF_ITEM_EVENT(xfs_buf_item_push); 480DEFINE_BUF_ITEM_EVENT(xfs_buf_item_push);
481DEFINE_BUF_ITEM_EVENT(xfs_trans_get_buf); 481DEFINE_BUF_ITEM_EVENT(xfs_trans_get_buf);
diff --git a/fs/xfs/xfs_trans.c b/fs/xfs/xfs_trans.c
index 003d916904d2..261c51486d7a 100644
--- a/fs/xfs/xfs_trans.c
+++ b/fs/xfs/xfs_trans.c
@@ -780,9 +780,8 @@ xfs_trans_free_items(
780 xfs_trans_del_item(lip); 780 xfs_trans_del_item(lip);
781 if (abort) 781 if (abort)
782 set_bit(XFS_LI_ABORTED, &lip->li_flags); 782 set_bit(XFS_LI_ABORTED, &lip->li_flags);
783 783 if (lip->li_ops->iop_release)
784 if (lip->li_ops->iop_unlock) 784 lip->li_ops->iop_release(lip);
785 lip->li_ops->iop_unlock(lip);
786 } 785 }
787} 786}
788 787
@@ -815,7 +814,7 @@ xfs_log_item_batch_insert(
815 * 814 *
816 * If we are called with the aborted flag set, it is because a log write during 815 * If we are called with the aborted flag set, it is because a log write during
817 * a CIL checkpoint commit has failed. In this case, all the items in the 816 * a CIL checkpoint commit has failed. In this case, all the items in the
818 * checkpoint have already gone through iop_committed and iop_unlock, which 817 * checkpoint have already gone through iop_committed and iop_committing, which
819 * means that checkpoint commit abort handling is treated exactly the same 818 * means that checkpoint commit abort handling is treated exactly the same
820 * as an iclog write error even though we haven't started any IO yet. Hence in 819 * as an iclog write error even though we haven't started any IO yet. Hence in
821 * this case all we need to do is iop_committed processing, followed by an 820 * this case all we need to do is iop_committed processing, followed by an
diff --git a/fs/xfs/xfs_trans.h b/fs/xfs/xfs_trans.h
index fd35da161a2b..522c1d565aa4 100644
--- a/fs/xfs/xfs_trans.h
+++ b/fs/xfs/xfs_trans.h
@@ -72,9 +72,9 @@ struct xfs_item_ops {
72 void (*iop_pin)(xfs_log_item_t *); 72 void (*iop_pin)(xfs_log_item_t *);
73 void (*iop_unpin)(xfs_log_item_t *, int remove); 73 void (*iop_unpin)(xfs_log_item_t *, int remove);
74 uint (*iop_push)(struct xfs_log_item *, struct list_head *); 74 uint (*iop_push)(struct xfs_log_item *, struct list_head *);
75 void (*iop_unlock)(xfs_log_item_t *); 75 void (*iop_committing)(struct xfs_log_item *, xfs_lsn_t commit_lsn);
76 void (*iop_release)(struct xfs_log_item *);
76 xfs_lsn_t (*iop_committed)(xfs_log_item_t *, xfs_lsn_t); 77 xfs_lsn_t (*iop_committed)(xfs_log_item_t *, xfs_lsn_t);
77 void (*iop_committing)(xfs_log_item_t *, xfs_lsn_t);
78 void (*iop_error)(xfs_log_item_t *, xfs_buf_t *); 78 void (*iop_error)(xfs_log_item_t *, xfs_buf_t *);
79}; 79};
80 80
diff --git a/fs/xfs/xfs_trans_buf.c b/fs/xfs/xfs_trans_buf.c
index a1764a1dbd99..0cdd8a314d85 100644
--- a/fs/xfs/xfs_trans_buf.c
+++ b/fs/xfs/xfs_trans_buf.c
@@ -427,7 +427,7 @@ xfs_trans_brelse(
427 427
428/* 428/*
429 * Mark the buffer as not needing to be unlocked when the buf item's 429 * Mark the buffer as not needing to be unlocked when the buf item's
430 * iop_unlock() routine is called. The buffer must already be locked 430 * iop_committing() routine is called. The buffer must already be locked
431 * and associated with the given transaction. 431 * and associated with the given transaction.
432 */ 432 */
433/* ARGSUSED */ 433/* ARGSUSED */