xfs
[Top] [All Lists]

[PATCH 43/48] xfs_repair: drop buffer reference on symlink error

To: xfs@xxxxxxxxxxx
Subject: [PATCH 43/48] xfs_repair: drop buffer reference on symlink error
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Fri, 7 Jun 2013 10:26:06 +1000
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1370564771-4929-1-git-send-email-david@xxxxxxxxxxxxx>
References: <1370564771-4929-1-git-send-email-david@xxxxxxxxxxxxx>
From: Dave Chinner <dchinner@xxxxxxxxxx>

Failing to drop the buffer when the header is bad results in a
deadlock in a later phase when we try to read the remote symlink
again.

Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
---
 repair/dinode.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/repair/dinode.c b/repair/dinode.c
index 2df9a91..31a26d7 100644
--- a/repair/dinode.c
+++ b/repair/dinode.c
@@ -1523,6 +1523,7 @@ _("cannot read inode %" PRIu64 ", file block %d, disk 
block %" PRIu64 "\n"),
                                        do_warn(
 _("bad symlink header ino %" PRIu64 ", file block %d, disk block %" PRIu64 
"\n"),
                                                lino, i, fsbno);
+                                       libxfs_putbuf(bp);
                                        return(1);
                                }
                                buf_data += sizeof(struct xfs_dsymlink_hdr);
-- 
1.7.10.4

<Prev in Thread] Current Thread [Next in Thread>