All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: sandeen@sandeen.net
Cc: linux-xfs@vger.kernel.org
Subject: [PATCH 7/8] repair: cleanup build_agf_agfl
Date: Sat,  9 May 2020 19:01:24 +0200	[thread overview]
Message-ID: <20200509170125.952508-8-hch@lst.de> (raw)
In-Reply-To: <20200509170125.952508-1-hch@lst.de>

No need to have two variables for the AGFL block number array.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 repair/phase5.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/repair/phase5.c b/repair/phase5.c
index 17b57448..677297fe 100644
--- a/repair/phase5.c
+++ b/repair/phase5.c
@@ -2149,18 +2149,15 @@ build_agf_agfl(
 
 	/* setting to 0xff results in initialisation to NULLAGBLOCK */
 	memset(agfl, 0xff, mp->m_sb.sb_sectsize);
+	freelist = xfs_buf_to_agfl_bno(agfl_buf);
 	if (xfs_sb_version_hascrc(&mp->m_sb)) {
-		__be32 *agfl_bno = xfs_buf_to_agfl_bno(agfl_buf);
-
 		agfl->agfl_magicnum = cpu_to_be32(XFS_AGFL_MAGIC);
 		agfl->agfl_seqno = cpu_to_be32(agno);
 		platform_uuid_copy(&agfl->agfl_uuid, &mp->m_sb.sb_meta_uuid);
 		for (i = 0; i < libxfs_agfl_size(mp); i++)
-			agfl_bno[i] = cpu_to_be32(NULLAGBLOCK);
+			freelist[i] = cpu_to_be32(NULLAGBLOCK);
 	}
 
-	freelist = xfs_buf_to_agfl_bno(agfl_buf);
-
 	/*
 	 * do we have left-over blocks in the btree cursors that should
 	 * be used to fill the AGFL?
-- 
2.26.2


  parent reply	other threads:[~2020-05-09 17:01 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-09 17:01 misc xfsprogs cleanups after the 5.7 merge Christoph Hellwig
2020-05-09 17:01 ` [PATCH 1/8] libxfs: use tabs instead of spaces in div_u64 Christoph Hellwig
2020-05-09 17:06   ` Darrick J. Wong
2020-05-09 17:08   ` Eric Sandeen
2020-05-09 17:01 ` [PATCH 2/8] db: fix a comment in scan_freelist Christoph Hellwig
2020-05-09 17:06   ` Darrick J. Wong
2020-05-09 17:01 ` [PATCH 3/8] db: add a comment to agfl_crc_flds Christoph Hellwig
2020-05-09 17:07   ` Darrick J. Wong
2020-05-09 17:10     ` Christoph Hellwig
2020-05-09 17:32       ` Eric Sandeen
2020-05-09 19:18         ` Darrick J. Wong
2020-05-10  7:11         ` Christoph Hellwig
2020-05-09 17:01 ` [PATCH 4/8] db: cleanup attr_set_f and attr_remove_f Christoph Hellwig
2020-05-09 17:08   ` Darrick J. Wong
2020-05-09 17:23   ` Eric Sandeen
2020-05-10  7:11     ` Christoph Hellwig
2020-05-10 14:09       ` Eric Sandeen
2020-05-11  3:41         ` Darrick J. Wong
2020-05-11 13:21           ` Eric Sandeen
2020-05-09 17:01 ` [PATCH 5/8] db: validate name and namelen in " Christoph Hellwig
2020-05-09 17:09   ` Darrick J. Wong
2020-05-09 17:12     ` Christoph Hellwig
2020-05-09 17:01 ` [PATCH 6/8] db: ensure that create and replace are exclusive in attr_set_f Christoph Hellwig
2020-05-09 17:09   ` Darrick J. Wong
2020-05-09 17:01 ` Christoph Hellwig [this message]
2020-05-09 17:11   ` [PATCH 7/8] repair: cleanup build_agf_agfl Darrick J. Wong
2020-05-09 17:47     ` Eric Sandeen
2020-05-09 17:01 ` [PATCH 8/8] metadump: small cleanup for process_inode Christoph Hellwig
2020-05-09 17:11   ` Darrick J. Wong
2020-05-09 19:03 ` misc xfsprogs cleanups after the 5.7 merge 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=20200509170125.952508-8-hch@lst.de \
    --to=hch@lst.de \
    --cc=linux-xfs@vger.kernel.org \
    --cc=sandeen@sandeen.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.