From: Eric Sandeen Date: Wed, 15 May 2002 21:23:31 +0000 (+0000) Subject: Return EIO from xlog_find_zeroed if xlog_find_verify_log_record X-Git-Tag: v2.1.0~26 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=79c48ada6ac57b99560a12a3aa4a980465bb171d;p=thirdparty%2Fxfsprogs-dev.git Return EIO from xlog_find_zeroed if xlog_find_verify_log_record can't find the header. Otherwise the block number from xlog_find_zeroed will be used uninitialized. --- diff --git a/libxlog/xfs_log_recover.c b/libxlog/xfs_log_recover.c index 25adab221..85c32d87f 100644 --- a/libxlog/xfs_log_recover.c +++ b/libxlog/xfs_log_recover.c @@ -746,7 +746,10 @@ xlog_find_zeroed(struct log *log, * to search the end of the log because we know it is zero. */ if ((error = xlog_find_verify_log_record(log, start_blk, - &last_blk, 0))) + &last_blk, 0)) == -1) { + error = XFS_ERROR(EIO); + goto bp_err; + } else if (error) goto bp_err; *blk_no = last_blk;