Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 33225
b: refs/heads/master
c: 1fb32b7
h: refs/heads/master
i:
  33223: 6e5a9cc
v: v3
  • Loading branch information
Evgeniy Dushistov authored and Linus Torvalds committed Aug 6, 2006
1 parent 4a52741 commit 98f5f4e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 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: e91467ecd1ef381377fd327c0ded922835ec52ab
refs/heads/master: 1fb32b7bd8203d0175649a75ede3ee7634d6a941
15 changes: 8 additions & 7 deletions trunk/fs/ufs/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ struct page *ufs_get_locked_page(struct address_space *mapping,
page = read_cache_page(mapping, index,
(filler_t*)mapping->a_ops->readpage,
NULL);

if (IS_ERR(page)) {
printk(KERN_ERR "ufs_change_blocknr: "
"read_cache_page error: ino %lu, index: %lu\n",
Expand All @@ -266,6 +267,13 @@ struct page *ufs_get_locked_page(struct address_space *mapping,

lock_page(page);

if (unlikely(page->mapping == NULL)) {
/* Truncate got there first */
unlock_page(page);
page_cache_release(page);
goto try_again;
}

if (!PageUptodate(page) || PageError(page)) {
unlock_page(page);
page_cache_release(page);
Expand All @@ -275,15 +283,8 @@ struct page *ufs_get_locked_page(struct address_space *mapping,
mapping->host->i_ino, index);

page = ERR_PTR(-EIO);
goto out;
}
}

if (unlikely(!page->mapping || !page_has_buffers(page))) {
unlock_page(page);
page_cache_release(page);
goto try_again;/*we really need these buffers*/
}
out:
return page;
}

0 comments on commit 98f5f4e

Please sign in to comment.