In the following code extracted from linux kernel 3.14 (mm/filemap.c) function lock_page_killable in line 1259 doesn't block when I
comment function readpage in line 1248.
Code:
1240 readpage:
1241 /*
1242 * A previous I/O error may have been due to temporary
1243 * failures, eg. multipath errors.
1244 * PG_error will be set again if readpage fails.
1245 */
1246 ClearPageError(page);
1247 /* Start the actual read. The read will unlock the page. */
1248 error = mapping->a_ops->readpage(filp, page);
1249
1250 if (unlikely(error)) {
1251 if (error == AOP_TRUNCATED_PAGE) {
1252 page_cache_release(page);
1253 goto find_page;
1254 }
1255 goto readpage_error;
1256 }
1257
1258 if (!PageUptodate(page)) {
1259 error = lock_page_killable(page);
1260 if (unlikely(error))
1261 goto readpage_error;
1262 if (!PageUptodate(page)) {
1263 if (page->mapping == NULL) {
1264 /*
1265 * invalidate_mapping_pages got it
1266 */
1267 unlock_page(page);
1268 page_cache_release(page);
1269 goto find_page;
1270 }
1271 unlock_page(page);
1272 shrink_readahead_size_eio(filp, ra);
1273 error = -EIO;
1274 goto readpage_error;
1275 }
1276 unlock_page(page);
1277 }
1278
What is wrong?
Thanks in advance!