lkml.org 
[lkml]   [2007]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH]mm __page_symlink retry loop error code fix
From
Date

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. Initilally i've add this fix as a part of prepare_write_retval patch,
but IMHO it is better to split this to separate fix.
Patch against 2.6.20-rc6-mm3.
Signed-off-by: Dmitriy Monakhov <dmonakhov@openvz.org>
-------
diff --git a/fs/namei.c b/fs/namei.c
index 723db81..6b6fe43 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -2692,10 +2692,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;
\
 
 \ /
  Last update: 2007-02-15 12:33    [W:0.028 / U:0.408 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site