[patch 34/51] NFS: Fix the return value in nfs_page_mkwrite()

From: Greg KH
Date: Thu May 14 2009 - 18:53:29 EST


2.6.29-stable review patch. If anyone has any objections, please let us know.

------------------

From: Trond Myklebust <Trond.Myklebust@xxxxxxxxxx>

commit 2b2ec7554cf7ec5e4412f89a5af6abe8ce950700 upstream.

Commit c2ec175c39f62949438354f603f4aa170846aabb ("mm: page_mkwrite
change prototype to match fault") exposed a bug in the NFS
implementation of page_mkwrite. We should be returning 0 on success...

Signed-off-by: Trond Myklebust <Trond.Myklebust@xxxxxxxxxx>
Signed-off-by: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>

---
fs/nfs/file.c | 2 --
1 file changed, 2 deletions(-)

--- a/fs/nfs/file.c
+++ b/fs/nfs/file.c
@@ -480,8 +480,6 @@ static int nfs_vm_page_mkwrite(struct vm
goto out_unlock;

ret = nfs_updatepage(filp, page, 0, pagelen);
- if (ret == 0)
- ret = pagelen;
out_unlock:
unlock_page(page);
if (ret)


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/