aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/xfs/libxfs/xfs_rtbitmap.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/fs/xfs/libxfs/xfs_rtbitmap.c b/fs/xfs/libxfs/xfs_rtbitmap.c
index 50e3b9302722..7c818f1e4484 100644
--- a/fs/xfs/libxfs/xfs_rtbitmap.c
+++ b/fs/xfs/libxfs/xfs_rtbitmap.c
@@ -460,7 +460,7 @@ xfs_rtmodify_summary_int(
460 /* 460 /*
461 * If we have an old buffer, and the block number matches, use that. 461 * If we have an old buffer, and the block number matches, use that.
462 */ 462 */
463 if (rbpp && *rbpp && *rsb == sb) 463 if (*rbpp && *rsb == sb)
464 bp = *rbpp; 464 bp = *rbpp;
465 /* 465 /*
466 * Otherwise we have to get the buffer. 466 * Otherwise we have to get the buffer.
@@ -469,7 +469,7 @@ xfs_rtmodify_summary_int(
469 /* 469 /*
470 * If there was an old one, get rid of it first. 470 * If there was an old one, get rid of it first.
471 */ 471 */
472 if (rbpp && *rbpp) 472 if (*rbpp)
473 xfs_trans_brelse(tp, *rbpp); 473 xfs_trans_brelse(tp, *rbpp);
474 error = xfs_rtbuf_get(mp, tp, sb, 1, &bp); 474 error = xfs_rtbuf_get(mp, tp, sb, 1, &bp);
475 if (error) { 475 if (error) {
@@ -478,10 +478,8 @@ xfs_rtmodify_summary_int(
478 /* 478 /*
479 * Remember this buffer and block for the next call. 479 * Remember this buffer and block for the next call.
480 */ 480 */
481 if (rbpp) { 481 *rbpp = bp;
482 *rbpp = bp; 482 *rsb = sb;
483 *rsb = sb;
484 }
485 } 483 }
486 /* 484 /*
487 * Point to the summary information, modify/log it, and/or copy it out. 485 * Point to the summary information, modify/log it, and/or copy it out.
@@ -493,14 +491,8 @@ xfs_rtmodify_summary_int(
493 *sp += delta; 491 *sp += delta;
494 xfs_trans_log_buf(tp, bp, first, first + sizeof(*sp) - 1); 492 xfs_trans_log_buf(tp, bp, first, first + sizeof(*sp) - 1);
495 } 493 }
496 if (sum) { 494 if (sum)
497 /*
498 * Drop the buffer if we're not asked to remember it.
499 */
500 if (!rbpp)
501 xfs_trans_brelse(tp, bp);
502 *sum = *sp; 495 *sum = *sp;
503 }
504 return 0; 496 return 0;
505} 497}
506 498