From: Steven Whitehouse <swhiteho@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [Patch 08/44] fsck.gfs2: eliminate vestigial buffer_head variable in check_leaf
Date: Fri, 12 Aug 2011 10:18:51 +0100 [thread overview]
Message-ID: <1313140731.2704.24.camel@menhir> (raw)
In-Reply-To: <2022993666.544648.1313096465827.JavaMail.root@zmail06.collab.prod.int.phx2.redhat.com>
Likewise this one,
Steve.
On Thu, 2011-08-11 at 17:01 -0400, Bob Peterson wrote:
> >From dfa63a3b56e71b8607098cb02e5162fc01aa8bab Mon Sep 17 00:00:00 2001
> From: Bob Peterson <rpeterso@redhat.com>
> Date: Mon, 8 Aug 2011 13:28:08 -0500
> Subject: [PATCH 08/44] fsck.gfs2: eliminate vestigial buffer_head variable in
> check_leaf
>
> This patch eliminates a variable bh from all the check_leaf metawalk
> functions because it is no longer referenced.
>
> rhbzs#675723
> ---
> gfs2/fsck/metawalk.c | 10 ++++------
> gfs2/fsck/metawalk.h | 5 ++---
> gfs2/fsck/pass1.c | 14 ++++++--------
> 3 files changed, 12 insertions(+), 17 deletions(-)
>
> diff --git a/gfs2/fsck/metawalk.c b/gfs2/fsck/metawalk.c
> index 5d0afa5..ea1774a 100644
> --- a/gfs2/fsck/metawalk.c
> +++ b/gfs2/fsck/metawalk.c
> @@ -686,7 +686,7 @@ static int check_leaf_blks(struct gfs2_inode *ip, struct metawalk_fxns *pass)
> }
> gfs2_leaf_in(&leaf, lbh);
> if (pass->check_leaf)
> - error = pass->check_leaf(ip, leaf_no, lbh,
> + error = pass->check_leaf(ip, leaf_no,
> pass->private);
>
> /*
> @@ -1462,10 +1462,9 @@ int delete_metadata(struct gfs2_inode *ip, uint64_t block,
> return delete_block_if_notdup(ip, block, bh, _("metadata"), private);
> }
>
> -int delete_leaf(struct gfs2_inode *ip, uint64_t block,
> - struct gfs2_buffer_head *bh, void *private)
> +int delete_leaf(struct gfs2_inode *ip, uint64_t block, void *private)
> {
> - return delete_block_if_notdup(ip, block, &bh, _("leaf"), private);
> + return delete_block_if_notdup(ip, block, NULL, _("leaf"), private);
> }
>
> int delete_data(struct gfs2_inode *ip, uint64_t block, void *private)
> @@ -1528,8 +1527,7 @@ static int alloc_data(struct gfs2_inode *ip, uint64_t block, void *private)
> return 0;
> }
>
> -static int alloc_leaf(struct gfs2_inode *ip, uint64_t block,
> - struct gfs2_buffer_head *bh, void *private)
> +static int alloc_leaf(struct gfs2_inode *ip, uint64_t block, void *private)
> {
> uint8_t q;
>
> diff --git a/gfs2/fsck/metawalk.h b/gfs2/fsck/metawalk.h
> index c1e61fb..ea023b6 100644
> --- a/gfs2/fsck/metawalk.h
> +++ b/gfs2/fsck/metawalk.h
> @@ -20,8 +20,7 @@ extern int delete_block(struct gfs2_inode *ip, uint64_t block,
> void *private);
> extern int delete_metadata(struct gfs2_inode *ip, uint64_t block,
> struct gfs2_buffer_head **bh, int h, void *private);
> -extern int delete_leaf(struct gfs2_inode *ip, uint64_t block,
> - struct gfs2_buffer_head *bh, void *private);
> +extern int delete_leaf(struct gfs2_inode *ip, uint64_t block, void *private);
> extern int delete_data(struct gfs2_inode *ip, uint64_t block, void *private);
> extern int delete_eattr_indir(struct gfs2_inode *ip, uint64_t block, uint64_t parent,
> struct gfs2_buffer_head **bh, void *private);
> @@ -60,7 +59,7 @@ extern struct gfs2_inode *fsck_system_inode(struct gfs2_sbd *sdp,
> struct metawalk_fxns {
> void *private;
> int (*check_leaf) (struct gfs2_inode *ip, uint64_t block,
> - struct gfs2_buffer_head *bh, void *private);
> + void *private);
> int (*check_metalist) (struct gfs2_inode *ip, uint64_t block,
> struct gfs2_buffer_head **bh, int h,
> void *private);
> diff --git a/gfs2/fsck/pass1.c b/gfs2/fsck/pass1.c
> index 30d6b3c..f0e7277 100644
> --- a/gfs2/fsck/pass1.c
> +++ b/gfs2/fsck/pass1.c
> @@ -34,8 +34,7 @@ struct block_count {
> uint64_t ea_count;
> };
>
> -static int leaf(struct gfs2_inode *ip, uint64_t block,
> - struct gfs2_buffer_head *bh, void *private);
> +static int leaf(struct gfs2_inode *ip, uint64_t block, void *private);
> static int check_metalist(struct gfs2_inode *ip, uint64_t block,
> struct gfs2_buffer_head **bh, int h, void *private);
> static int undo_check_metalist(struct gfs2_inode *ip, uint64_t block,
> @@ -66,7 +65,7 @@ static int invalidate_metadata(struct gfs2_inode *ip, uint64_t block,
> struct gfs2_buffer_head **bh, int h,
> void *private);
> static int invalidate_leaf(struct gfs2_inode *ip, uint64_t block,
> - struct gfs2_buffer_head *bh, void *private);
> + void *private);
> static int invalidate_data(struct gfs2_inode *ip, uint64_t block,
> void *private);
> static int invalidate_eattr_indir(struct gfs2_inode *ip, uint64_t block,
> @@ -200,8 +199,7 @@ struct metawalk_fxns sysdir_fxns = {
> .check_dentry = resuscitate_dentry,
> };
>
> -static int leaf(struct gfs2_inode *ip, uint64_t block,
> - struct gfs2_buffer_head *bh, void *private)
> +static int leaf(struct gfs2_inode *ip, uint64_t block, void *private)
> {
> struct block_count *bc = (struct block_count *) private;
>
> @@ -856,7 +854,7 @@ static int invalidate_metadata(struct gfs2_inode *ip, uint64_t block,
> }
>
> static int invalidate_leaf(struct gfs2_inode *ip, uint64_t block,
> - struct gfs2_buffer_head *bh, void *private)
> + void *private)
> {
> return mark_block_invalid(ip, block, ref_as_meta, _("leaf"));
> }
> @@ -939,9 +937,9 @@ static int rangecheck_metadata(struct gfs2_inode *ip, uint64_t block,
> }
>
> static int rangecheck_leaf(struct gfs2_inode *ip, uint64_t block,
> - struct gfs2_buffer_head *bh, void *private)
> + void *private)
> {
> - return rangecheck_block(ip, block, &bh, _("leaf"), private);
> + return rangecheck_block(ip, block, NULL, _("leaf"), private);
> }
>
> static int rangecheck_data(struct gfs2_inode *ip, uint64_t block,
prev parent reply other threads:[~2011-08-12 9:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-11 21:01 [Cluster-devel] [Patch 08/44] fsck.gfs2: eliminate vestigial buffer_head variable in check_leaf Bob Peterson
2011-08-12 9:18 ` Steven Whitehouse [this message]
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=1313140731.2704.24.camel@menhir \
--to=swhiteho@redhat.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;
as well as URLs for NNTP newsgroup(s).