mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 11:46:19 +00:00
[PATCH] __page_symlink retry loop error code fix
If prepare_write or commit_write return AOP_TRUNCATED_PAGE we jump to "retry" label and than if find_or_create_page() failed function return incorrect error code. Signed-off-by: Dmitriy Monakhov <dmonakhov@openvz.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
fb4d64e78c
commit
beb497ab48
1 changed files with 2 additions and 1 deletions
|
@ -2688,10 +2688,11 @@ int __page_symlink(struct inode *inode, const char *symname, int len,
|
||||||
{
|
{
|
||||||
struct address_space *mapping = inode->i_mapping;
|
struct address_space *mapping = inode->i_mapping;
|
||||||
struct page *page;
|
struct page *page;
|
||||||
int err = -ENOMEM;
|
int err;
|
||||||
char *kaddr;
|
char *kaddr;
|
||||||
|
|
||||||
retry:
|
retry:
|
||||||
|
err = -ENOMEM;
|
||||||
page = find_or_create_page(mapping, 0, gfp_mask);
|
page = find_or_create_page(mapping, 0, gfp_mask);
|
||||||
if (!page)
|
if (!page)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
Loading…
Reference in a new issue