Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 38743
b: refs/heads/master
c: ffeb874
h: refs/heads/master
i:
  38741: 2bd8bf5
  38739: 00e9449
  38735: 2821f0b
v: v3
  • Loading branch information
Steven Whitehouse committed Jul 10, 2006
1 parent 90f835b commit dac322f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dc3e130a08996e2b56381365a5ac7bb1ce2a9f47
refs/heads/master: ffeb874b2b893aea7d10b0b088e06a7b1ded2a3e
10 changes: 5 additions & 5 deletions trunk/fs/gfs2/ops_address.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,6 @@ static int gfs2_readpage(struct file *file, struct page *page)
goto out;
}

#define list_to_page(head) (list_entry((head)->prev, struct page, lru))

/**
* gfs2_readpages - Read a bunch of pages at once
*
Expand Down Expand Up @@ -290,16 +288,18 @@ static int gfs2_readpages(struct file *file, struct address_space *mapping,
struct pagevec lru_pvec;
pagevec_init(&lru_pvec, 0);
for (page_idx = 0; page_idx < nr_pages; page_idx++) {
struct page *page = list_to_page(pages);
struct page *page = list_entry(pages->prev, struct page, lru);
prefetchw(&page->flags);
list_del(&page->lru);
if (!add_to_page_cache(page, mapping,
page->index, GFP_KERNEL)) {
ret = stuffed_readpage(ip, page);
unlock_page(page);
if (!pagevec_add(&lru_pvec, page))
__pagevec_lru_add(&lru_pvec);
} else {
page_cache_release(page);
}
page_cache_release(page);
}
pagevec_lru_add(&lru_pvec);
ret = 0;
Expand All @@ -321,7 +321,7 @@ static int gfs2_readpages(struct file *file, struct address_space *mapping,
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_to_page(pages);
struct page *page = list_entry(pages->prev, struct page, lru);
list_del(&page->lru);
unlock_page(page);
page_cache_release(page);
Expand Down

0 comments on commit dac322f

Please sign in to comment.