Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 321374
b: refs/heads/master
c: 4b74f6e
h: refs/heads/master
v: v3
  • Loading branch information
Boaz Harrosh committed Aug 2, 2012
1 parent 0647576 commit 9600f3c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 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: 66153f6e0f89c75d18e490739b0149dfd2e53b69
refs/heads/master: 4b74f6ea8417e48bb1fc65880a0574134a8b4745
15 changes: 12 additions & 3 deletions trunk/fs/exofs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -574,8 +574,16 @@ static struct page *__r4w_get_page(void *priv, u64 offset, bool *uptodate)

if (!pcol->that_locked_page ||
(pcol->that_locked_page->index != index)) {
struct page *page = find_get_page(pcol->inode->i_mapping, index);
struct page *page;
loff_t i_size = i_size_read(pcol->inode);

if (offset >= i_size) {
*uptodate = true;
EXOFS_DBGMSG("offset >= i_size index=0x%lx\n", index);
return ZERO_PAGE(0);
}

page = find_get_page(pcol->inode->i_mapping, index);
if (!page) {
page = find_or_create_page(pcol->inode->i_mapping,
index, GFP_NOFS);
Expand Down Expand Up @@ -604,12 +612,13 @@ static void __r4w_put_page(void *priv, struct page *page)
{
struct page_collect *pcol = priv;

if (pcol->that_locked_page != page) {
if ((pcol->that_locked_page != page) && (ZERO_PAGE(0) != page)) {
EXOFS_DBGMSG("index=0x%lx\n", page->index);
page_cache_release(page);
return;
}
EXOFS_DBGMSG("that_locked_page index=0x%lx\n", page->index);
EXOFS_DBGMSG("that_locked_page index=0x%lx\n",
ZERO_PAGE(0) == page ? -1 : page->index);
}

static const struct _ore_r4w_op _r4w_op = {
Expand Down

0 comments on commit 9600f3c

Please sign in to comment.