Commit ab6978c2 authored by Eric Sandeen's avatar Eric Sandeen Committed by Dave Chinner

xfs: remove rbpp check from xfs_rtmodify_summary_int

rbpp is always passed into xfs_rtmodify_summary
and xfs_rtget_summary, so there is no need to
test for it in xfs_rtmodify_summary_int.
Signed-off-by: default avatarEric Sandeen <sandeen@redhat.com>
Reviewed-by: default avatarDave Chinner <dchinner@redhat.com>
Signed-off-by: default avatarDave Chinner <david@fromorbit.com>
parent afabfd30
...@@ -460,7 +460,7 @@ xfs_rtmodify_summary_int( ...@@ -460,7 +460,7 @@ xfs_rtmodify_summary_int(
/* /*
* If we have an old buffer, and the block number matches, use that. * If we have an old buffer, and the block number matches, use that.
*/ */
if (rbpp && *rbpp && *rsb == sb) if (*rbpp && *rsb == sb)
bp = *rbpp; bp = *rbpp;
/* /*
* Otherwise we have to get the buffer. * Otherwise we have to get the buffer.
...@@ -469,7 +469,7 @@ xfs_rtmodify_summary_int( ...@@ -469,7 +469,7 @@ xfs_rtmodify_summary_int(
/* /*
* If there was an old one, get rid of it first. * If there was an old one, get rid of it first.
*/ */
if (rbpp && *rbpp) if (*rbpp)
xfs_trans_brelse(tp, *rbpp); xfs_trans_brelse(tp, *rbpp);
error = xfs_rtbuf_get(mp, tp, sb, 1, &bp); error = xfs_rtbuf_get(mp, tp, sb, 1, &bp);
if (error) { if (error) {
...@@ -478,10 +478,8 @@ xfs_rtmodify_summary_int( ...@@ -478,10 +478,8 @@ xfs_rtmodify_summary_int(
/* /*
* Remember this buffer and block for the next call. * Remember this buffer and block for the next call.
*/ */
if (rbpp) { *rbpp = bp;
*rbpp = bp; *rsb = sb;
*rsb = sb;
}
} }
/* /*
* Point to the summary information, modify/log it, and/or copy it out. * Point to the summary information, modify/log it, and/or copy it out.
...@@ -493,14 +491,8 @@ xfs_rtmodify_summary_int( ...@@ -493,14 +491,8 @@ xfs_rtmodify_summary_int(
*sp += delta; *sp += delta;
xfs_trans_log_buf(tp, bp, first, first + sizeof(*sp) - 1); xfs_trans_log_buf(tp, bp, first, first + sizeof(*sp) - 1);
} }
if (sum) { if (sum)
/*
* Drop the buffer if we're not asked to remember it.
*/
if (!rbpp)
xfs_trans_brelse(tp, bp);
*sum = *sp; *sum = *sp;
}
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment