Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 377656
b: refs/heads/master
c: 650495d
h: refs/heads/master
v: v3
  • Loading branch information
Jaegeuk Kim committed May 28, 2013
1 parent 247449c commit 2543dbc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 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: 65e5cd0a151d53d3d79ef4d81783d1dbc01d4b61
refs/heads/master: 650495dedc34daf8590c708a5b48f82ed2787b75
17 changes: 11 additions & 6 deletions trunk/fs/f2fs/data.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,18 +233,23 @@ struct page *get_lock_data_page(struct inode *inode, pgoff_t index)
struct page *page;
int err;

repeat:
page = grab_cache_page(mapping, index);
if (!page)
return ERR_PTR(-ENOMEM);

set_new_dnode(&dn, inode, NULL, NULL, 0);
err = get_dnode_of_data(&dn, index, LOOKUP_NODE);
if (err)
if (err) {
f2fs_put_page(page, 1);
return ERR_PTR(err);
}
f2fs_put_dnode(&dn);

if (dn.data_blkaddr == NULL_ADDR)
if (dn.data_blkaddr == NULL_ADDR) {
f2fs_put_page(page, 1);
return ERR_PTR(-ENOENT);
repeat:
page = grab_cache_page(mapping, index);
if (!page)
return ERR_PTR(-ENOMEM);
}

if (PageUptodate(page))
return page;
Expand Down

0 comments on commit 2543dbc

Please sign in to comment.