From: Eric Sandeen <sandeen@sandeen.net>
To: Eric Sandeen <sandeen@redhat.com>, xfs-oss <xfs@oss.sgi.com>
Subject: [PATCH 4/4] xfs: remove rbpp check from xfs_rtmodify_summary_int
Date: Thu, 21 Aug 2014 20:03:19 -0500 [thread overview]
Message-ID: <53F696D7.2030906@sandeen.net> (raw)
In-Reply-To: <53F6942B.80808@redhat.com>
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: Eric Sandeen <sandeen@redhat.com>
---
diff --git a/fs/xfs/libxfs/xfs_rtbitmap.c b/fs/xfs/libxfs/xfs_rtbitmap.c
index 50e3b93..7c818f1 100644
--- a/fs/xfs/libxfs/xfs_rtbitmap.c
+++ b/fs/xfs/libxfs/xfs_rtbitmap.c
@@ -460,7 +460,7 @@ xfs_rtmodify_summary_int(
/*
* If we have an old buffer, and the block number matches, use that.
*/
- if (rbpp && *rbpp && *rsb == sb)
+ if (*rbpp && *rsb == sb)
bp = *rbpp;
/*
* Otherwise we have to get the buffer.
@@ -469,7 +469,7 @@ xfs_rtmodify_summary_int(
/*
* If there was an old one, get rid of it first.
*/
- if (rbpp && *rbpp)
+ if (*rbpp)
xfs_trans_brelse(tp, *rbpp);
error = xfs_rtbuf_get(mp, tp, sb, 1, &bp);
if (error) {
@@ -478,10 +478,8 @@ xfs_rtmodify_summary_int(
/*
* Remember this buffer and block for the next call.
*/
- if (rbpp) {
- *rbpp = bp;
- *rsb = sb;
- }
+ *rbpp = bp;
+ *rsb = sb;
}
/*
* Point to the summary information, modify/log it, and/or copy it out.
@@ -493,14 +491,8 @@ xfs_rtmodify_summary_int(
*sp += delta;
xfs_trans_log_buf(tp, bp, first, first + sizeof(*sp) - 1);
}
- if (sum) {
- /*
- * Drop the buffer if we're not asked to remember it.
- */
- if (!rbpp)
- xfs_trans_brelse(tp, bp);
+ if (sum)
*sum = *sp;
- }
return 0;
}
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2014-08-22 1:03 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-22 0:51 [PATCH 0/4] xfs: more code refactoring Eric Sandeen
2014-08-22 0:55 ` [PATCH 1/4] xfs: check resblks before calling xfs_dir_canenter Eric Sandeen
2014-08-22 13:19 ` Brian Foster
2014-08-29 0:59 ` Christoph Hellwig
2014-08-22 0:58 ` [PATCH 2/4] xfs: combine xfs_dir_canenter into xfs_dir_createname Eric Sandeen
2014-08-22 13:19 ` Brian Foster
2014-08-29 1:00 ` Christoph Hellwig
2014-08-29 2:14 ` [PATCH 2/4 V2] " Eric Sandeen
2014-08-22 1:00 ` [PATCH 3/4] xfs: combine xfs_rtmodify_summary and xfs_rtget_summary Eric Sandeen
2014-08-22 13:19 ` Brian Foster
2014-08-22 15:01 ` Eric Sandeen
2014-08-22 15:23 ` Eric Sandeen
2014-08-22 1:03 ` Eric Sandeen [this message]
2014-08-22 13:20 ` [PATCH 4/4] xfs: remove rbpp check from xfs_rtmodify_summary_int Brian Foster
2014-08-23 23:50 ` Eric Sandeen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53F696D7.2030906@sandeen.net \
--to=sandeen@sandeen.net \
--cc=sandeen@redhat.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox