]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
Return EIO from xlog_find_zeroed if xlog_find_verify_log_record
authorEric Sandeen <sandeen@sgi.com>
Wed, 15 May 2002 21:23:31 +0000 (21:23 +0000)
committerEric Sandeen <sandeen@sgi.com>
Wed, 15 May 2002 21:23:31 +0000 (21:23 +0000)
can't find the header.  Otherwise the block number from
xlog_find_zeroed will be used uninitialized.

libxlog/xfs_log_recover.c

index 25adab221bd4da5ea10f5ee4ca45af6e8a0a3785..85c32d87f7a69371d502c1d65c943487113f991b 100644 (file)
@@ -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;