]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
libxfs: handle read errors in libxfs_trans_read_buf
authorChristoph Hellwig <hch@infradead.org>
Tue, 20 Sep 2011 21:59:18 +0000 (21:59 +0000)
committerAlex Elder <aelder@sgi.com>
Wed, 21 Sep 2011 18:50:33 +0000 (13:50 -0500)
commit00aea09fd64aa351bdbb716c936ad24bdcfe91a9
tree0500013271c5785c91470cb6f257f8be893ce66c
parentf934f4a52f3e218f7bf8a6d90837aed6960c7102
libxfs: handle read errors in libxfs_trans_read_buf

Libxfs_readbuf may return a NULL buffer to indicate that an
error happend during the read, but we currently ignore that
if libxfs_trans_read_buf is called with a NULL transaction
pointer.  Fix this by copying the relevant code from the
kernel version of the routine, and also tidy the code up a
bit by using a common exit label.

This fixes a regression that was introduced in xfsprogs 3.0.0 by
commit:

"Implement buffer and inode caching in libxfs, groundwork
 for a parallel version of xfs_repair."

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
libxfs/trans.c