From: OGAWA Hirofumi This just ignore the remaining pages, and remove unneeded unlock_pages(). Signed-off-by: OGAWA Hirofumi Cc: Steven French Cc: Miklos Szeredi Cc: Steven Whitehouse Cc: Trond Myklebust Signed-off-by: Andrew Morton --- fs/gfs2/ops_address.c | 7 ------- 1 file changed, 7 deletions(-) diff -puN fs/gfs2/ops_address.c~gfs2-readpages-fixes fs/gfs2/ops_address.c --- a/fs/gfs2/ops_address.c~gfs2-readpages-fixes +++ a/fs/gfs2/ops_address.c @@ -337,13 +337,6 @@ out: out_noerror: ret = 0; out_unlock: - /* unlock all pages, we can't do any I/O right now */ - for (page_idx = 0; page_idx < nr_pages; page_idx++) { - struct page *page = list_entry(pages->prev, struct page, lru); - list_del(&page->lru); - unlock_page(page); - page_cache_release(page); - } if (do_unlock) gfs2_holder_uninit(&gh); goto out; _