aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitriy Monakhov <dmonakhov@openvz.org>2007-02-16 04:27:18 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-16 11:13:56 -0500
commitbeb497ab48b1639282129f7bc18fef311fffff3d (patch)
treebd7852757e908eb3702eeb214556c2538abf4ded
parentfb4d64e78ceab77cf20f7796f74aa10ebe862032 (diff)
[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>
-rw-r--r--fs/namei.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/namei.c b/fs/namei.c
index 161e2225c757..ee60cc4d3453 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -2688,10 +2688,11 @@ int __page_symlink(struct inode *inode, const char *symname, int len,
2688{ 2688{
2689 struct address_space *mapping = inode->i_mapping; 2689 struct address_space *mapping = inode->i_mapping;
2690 struct page *page; 2690 struct page *page;
2691 int err = -ENOMEM; 2691 int err;
2692 char *kaddr; 2692 char *kaddr;
2693 2693
2694retry: 2694retry:
2695 err = -ENOMEM;
2695 page = find_or_create_page(mapping, 0, gfp_mask); 2696 page = find_or_create_page(mapping, 0, gfp_mask);
2696 if (!page) 2697 if (!page)
2697 goto fail; 2698 goto fail;