diff options
-rw-r--r-- | mm/filemap.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index ac8f690d2885..455119cc7f40 100644 --- a/mm/filemap.c +++ b/mm/filemap.c | |||
@@ -982,7 +982,8 @@ page_ok: | |||
982 | 982 | ||
983 | page_not_up_to_date: | 983 | page_not_up_to_date: |
984 | /* Get exclusive access to the page ... */ | 984 | /* Get exclusive access to the page ... */ |
985 | lock_page(page); | 985 | if (lock_page_killable(page)) |
986 | goto readpage_eio; | ||
986 | 987 | ||
987 | /* Did it get truncated before we got the lock? */ | 988 | /* Did it get truncated before we got the lock? */ |
988 | if (!page->mapping) { | 989 | if (!page->mapping) { |
@@ -1010,7 +1011,8 @@ readpage: | |||
1010 | } | 1011 | } |
1011 | 1012 | ||
1012 | if (!PageUptodate(page)) { | 1013 | if (!PageUptodate(page)) { |
1013 | lock_page(page); | 1014 | if (lock_page_killable(page)) |
1015 | goto readpage_eio; | ||
1014 | if (!PageUptodate(page)) { | 1016 | if (!PageUptodate(page)) { |
1015 | if (page->mapping == NULL) { | 1017 | if (page->mapping == NULL) { |
1016 | /* | 1018 | /* |
@@ -1021,15 +1023,16 @@ readpage: | |||
1021 | goto find_page; | 1023 | goto find_page; |
1022 | } | 1024 | } |
1023 | unlock_page(page); | 1025 | unlock_page(page); |
1024 | error = -EIO; | ||
1025 | shrink_readahead_size_eio(filp, ra); | 1026 | shrink_readahead_size_eio(filp, ra); |
1026 | goto readpage_error; | 1027 | goto readpage_eio; |
1027 | } | 1028 | } |
1028 | unlock_page(page); | 1029 | unlock_page(page); |
1029 | } | 1030 | } |
1030 | 1031 | ||
1031 | goto page_ok; | 1032 | goto page_ok; |
1032 | 1033 | ||
1034 | readpage_eio: | ||
1035 | error = -EIO; | ||
1033 | readpage_error: | 1036 | readpage_error: |
1034 | /* UHHUH! A synchronous read error occurred. Report it */ | 1037 | /* UHHUH! A synchronous read error occurred. Report it */ |
1035 | desc->error = error; | 1038 | desc->error = error; |