* [PATCH]mm __page_symlink retry loop error code fix
@ 2007-02-15 11:31 Dmitriy Monakhov
0 siblings, 0 replies; only message in thread
From: Dmitriy Monakhov @ 2007-02-15 11:31 UTC (permalink / raw)
To: linux-kernel; +Cc: devel
[-- Attachment #1: Type: text/plain, Size: 380 bytes --]
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>
-------
[-- Attachment #2: diff-mm-fs-page_symlink-fix --]
[-- Type: text/plain, Size: 424 bytes --]
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;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2007-02-15 11:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-15 11:31 [PATCH]mm __page_symlink retry loop error code fix Dmitriy Monakhov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox