mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
[PATCH] Cleanup read_pages()
Current read_pages() assume ->readpages() frees the passed pages. This patch free the pages in ->read_pages(), if those were remaining in the pages_list. So, readpages() just can ignore the remaining pages in pages_list. Signed-off-by: OGAWA Hirofumi <[email protected]> Cc: Steven French <[email protected]> Cc: Miklos Szeredi <[email protected]> Cc: Steven Whitehouse <[email protected]> Cc: Trond Myklebust <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
5d861d920a
commit
029e332ea7
1 changed files with 2 additions and 0 deletions
|
|
@ -173,6 +173,8 @@ static int read_pages(struct address_space *mapping, struct file *filp,
|
|||
|
||||
if (mapping->a_ops->readpages) {
|
||||
ret = mapping->a_ops->readpages(filp, mapping, pages, nr_pages);
|
||||
/* Clean up the remaining pages */
|
||||
put_pages_list(pages);
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue