]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_repair: drop buffer reference on symlink error
authorDave Chinner <dchinner@redhat.com>
Fri, 7 Jun 2013 00:26:06 +0000 (10:26 +1000)
committerBen Myers <bpm@sgi.com>
Tue, 6 Aug 2013 21:02:24 +0000 (16:02 -0500)
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@redhat.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
repair/dinode.c

index 1f3fd6ce0bb0ca16b7dd5fe4f4db344df3f678fa..13e5f35d5b4003413aa016b2ccd3c141258a69af 100644 (file)
@@ -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);