From mboxrd@z Thu Jan 1 00:00:00 1970 From: npiggin@suse.de Subject: [2.6.27.stable][patch 5/6] NFS: Fix the return value in nfs_page_mkwrite() Date: Tue, 12 May 2009 16:23:51 +1000 Message-ID: <20090512070750.234686168@suse.de> References: <20090512062346.554974013@suse.de> Cc: linux-fsdevel@vger.kernel.org, linux-mm@vger.kernel.org To: stable@kernel.org Return-path: Received: from cantor2.suse.de ([195.135.220.15]:59788 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757084AbZELHRW (ORCPT ); Tue, 12 May 2009 03:17:22 -0400 Content-Disposition: inline; filename=2b2ec7554cf7ec5e4412f89a5af6abe8ce950700 Sender: linux-fsdevel-owner@vger.kernel.org List-ID: NFS: Fix the return value in nfs_page_mkwrite() 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 Signed-off-by: Linus Torvalds --- fs/nfs/file.c | 2 -- 1 file changed, 2 deletions(-) Index: linux-2.6/fs/nfs/file.c =================================================================== --- linux-2.6.orig/fs/nfs/file.c +++ linux-2.6/fs/nfs/file.c @@ -477,8 +477,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)