From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: david@fromorbit.com
Cc: sandeen@sandeen.net, xfs@oss.sgi.com
Subject: [PATCH] xfs_repair: release corrupt directory node buffer
Date: Thu, 3 Sep 2015 21:21:04 -0700 [thread overview]
Message-ID: <20150904042104.GD10397@birch.djwong.org> (raw)
If repair encounters a dir node block that fails checksum or
verification, free the buffer before the directory gets rebuilt.
Reported-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
repair/dir2.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/repair/dir2.c b/repair/dir2.c
index a5646f8..54c49eb 100644
--- a/repair/dir2.c
+++ b/repair/dir2.c
@@ -200,6 +200,7 @@ _("bad dir magic number 0x%x in inode %" PRIu64 " bno = %u\n"),
}
/* corrupt node; rebuild the dir. */
if (bp->b_error == -EFSBADCRC || bp->b_error == -EFSCORRUPTED) {
+ libxfs_putbuf(bp);
do_warn(
_("corrupt tree block %u for directory inode %" PRIu64 "\n"),
bno, da_cursor->ino);
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next reply other threads:[~2015-09-04 4:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-04 4:21 Darrick J. Wong [this message]
2015-09-04 4:27 ` [PATCH] xfs_repair: release corrupt directory node buffer Eric Sandeen
2015-09-04 12:59 ` Carlos Maiolino
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=20150904042104.GD10397@birch.djwong.org \
--to=darrick.wong@oracle.com \
--cc=david@fromorbit.com \
--cc=sandeen@sandeen.net \
--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