Whamcloud - gitweb
Return an error code if the test_brw read check failed.
authoradilger <adilger>
Mon, 19 Aug 2002 23:57:32 +0000 (23:57 +0000)
committeradilger <adilger>
Mon, 19 Aug 2002 23:57:32 +0000 (23:57 +0000)
lustre/obdclass/class_obd.c

index d19a688..a299cd4 100644 (file)
@@ -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: