From: Dmitriy Monakhov Date: Fri, 16 Feb 2007 09:27:18 +0000 (-0800) Subject: [PATCH] __page_symlink retry loop error code fix X-Git-Tag: v2.6.21-rc1~167 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=beb497ab48b1639282129f7bc18fef311fffff3d;p=linux-2.6 [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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/namei.c b/fs/namei.c index 161e2225c7..ee60cc4d34 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -2688,10 +2688,11 @@ int __page_symlink(struct inode *inode, const char *symname, int len, { struct address_space *mapping = inode->i_mapping; struct page *page; - int err = -ENOMEM; + int err; char *kaddr; retry: + err = -ENOMEM; page = find_or_create_page(mapping, 0, gfp_mask); if (!page) goto fail;