From: adilger Date: Mon, 2 Sep 2002 19:04:21 +0000 (+0000) Subject: Don't check bulk contents if there was an error reported on the bulk itself. X-Git-Tag: 0.5.6~38 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=a5f8fb38889dc16774811d1f97ad54790e299811;p=fs%2Flustre-release.git Don't check bulk contents if there was an error reported on the bulk itself. --- diff --git a/lustre/obdclass/class_obd.c b/lustre/obdclass/class_obd.c index 98af2b0..8f789cb 100644 --- a/lustre/obdclass/class_obd.c +++ b/lustre/obdclass/class_obd.c @@ -548,20 +548,19 @@ static int obd_class_ioctl (struct inode * inode, struct file * filp, } err = obd_brw(rw, &conn, &smd, j, pga, ll_sync_io_cb, cbd); + if (err) + CERROR("test_brw: error from obd_brw: err = %d\n", err); EXIT; brw_cleanup: for (j = 0, pgp = pga; j < pages; j++, pgp++) { if (pgp->pg != NULL) { - if (verify) { + if (verify && !err) { void *addr = kmap(pgp->pg); - int err2; - - err2 = page_debug_check("test_brw", - addr, - PAGE_SIZE, - pgp->off,id); - if (!err) - err = err2; + + err = page_debug_check("test_brw", + addr, + PAGE_SIZE, + pgp->off,id); kunmap(pgp->pg); } __free_pages(pgp->pg, 0);