diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2018-08-26 08:23:23 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2018-08-28 18:55:04 -0400 |
commit | 55feb414bd110d928979257b96f2ebd30bf5064d (patch) | |
tree | 19728a160477d4357f93080a16dede8bb95aa30e | |
parent | 7242819a66cca33fbcefda6fc4a853e3f3a0544d (diff) |
cifs: convert to add_to_page_cache()
-rw-r--r-- | fs/cifs/file.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 8d41ca7bfcf1..a1537e2d4833 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@ -3689,20 +3689,12 @@ readpages_get_pages(struct address_space *mapping, struct list_head *page_list, page = list_entry(page_list->prev, struct page, lru); - /* - * Lock the page and put it in the cache. Since no one else - * should have access to this page, we're safe to simply set - * PG_locked without checking it first. - */ - __SetPageLocked(page); - rc = add_to_page_cache_locked(page, mapping, - page->index, gfp); + rc = add_to_page_cache(page, mapping, + page->index, gfp); /* give up if we can't stick it in the cache */ - if (rc) { - __ClearPageLocked(page); + if (rc) return rc; - } /* move first page to the tmplist */ *offset = (loff_t)page->index << PAGE_SHIFT; @@ -3721,11 +3713,8 @@ readpages_get_pages(struct address_space *mapping, struct list_head *page_list, if (*bytes + PAGE_SIZE > rsize) break; - __SetPageLocked(page); - if (add_to_page_cache_locked(page, mapping, page->index, gfp)) { - __ClearPageLocked(page); + if (add_to_page_cache(page, mapping, page->index, gfp)) break; - } list_move_tail(&page->lru, tmplist); (*bytes) += PAGE_SIZE; expected_index++; |