From 5db02dbf50249f744b344216dab568ad3d29d0b7 Mon Sep 17 00:00:00 2001 From: adilger Date: Mon, 19 Aug 2002 23:57:32 +0000 Subject: [PATCH] Return an error code if the test_brw read check failed. --- lustre/obdclass/class_obd.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lustre/obdclass/class_obd.c b/lustre/obdclass/class_obd.c index d19a688..a299cd4 100644 --- a/lustre/obdclass/class_obd.c +++ b/lustre/obdclass/class_obd.c @@ -529,13 +529,15 @@ static int obd_class_ioctl (struct inode * inode, struct file * filp, brw_cleanup: for (j = 0, pgp = pga; j < pages; j++) { if (pgp->pg != NULL) { + int err2; void *addr = kmap(pgp->pg); - page_debug_check("test_brw", addr, PAGE_SIZE, - pgp->off, id); + err2 = page_debug_check("test_brw", addr, + PAGE_SIZE, pgp->off,id); kunmap(pgp->pg); - __free_pages(pgp->pg, 0); + if (!err) + err = err2; } } brw_free: -- 1.8.3.1