Merge branch 'core-v28-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6.git] / mm / filemap.c
index bf8f9c0..903bf31 100644 (file)
@@ -1100,8 +1100,9 @@ page_ok:
 
 page_not_up_to_date:
                /* Get exclusive access to the page ... */
-               if (lock_page_killable(page))
-                       goto readpage_eio;
+               error = lock_page_killable(page);
+               if (unlikely(error))
+                       goto readpage_error;
 
 page_not_up_to_date_locked:
                /* Did it get truncated before we got the lock? */
@@ -1130,8 +1131,9 @@ readpage:
                }
 
                if (!PageUptodate(page)) {
-                       if (lock_page_killable(page))
-                               goto readpage_eio;
+                       error = lock_page_killable(page);
+                       if (unlikely(error))
+                               goto readpage_error;
                        if (!PageUptodate(page)) {
                                if (page->mapping == NULL) {
                                        /*
@@ -1143,15 +1145,14 @@ readpage:
                                }
                                unlock_page(page);
                                shrink_readahead_size_eio(filp, ra);
-                               goto readpage_eio;
+                               error = -EIO;
+                               goto readpage_error;
                        }
                        unlock_page(page);
                }
 
                goto page_ok;
 
-readpage_eio:
-               error = -EIO;
 readpage_error:
                /* UHHUH! A synchronous read error occurred. Report it */
                desc->error = error;