From patchwork Fri Jun 10 14:04:59 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fengguang Wu X-Patchwork-Id: 869802 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p5AE5PbL001796 for ; Fri, 10 Jun 2011 14:05:25 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753381Ab1FJOFE (ORCPT ); Fri, 10 Jun 2011 10:05:04 -0400 Received: from mga01.intel.com ([192.55.52.88]:21264 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753332Ab1FJOFD (ORCPT ); Fri, 10 Jun 2011 10:05:03 -0400 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 10 Jun 2011 07:05:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.65,347,1304319600"; d="scan'208";a="14796293" Received: from unknown (HELO localhost.localdomain) ([10.255.20.188]) by fmsmga002.fm.intel.com with ESMTP; 10 Jun 2011 07:05:01 -0700 Received: from wfg by localhost.localdomain with local (Exim 4.69) (envelope-from ) id 1QV2KZ-0002FK-JX; Fri, 10 Jun 2011 22:04:59 +0800 Date: Fri, 10 Jun 2011 22:04:59 +0800 From: Wu Fengguang To: Trond Myklebust Cc: Christoph Hellwig , linux-nfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, LKML Subject: [PATCH] NFS: return -EAGAIN when skipped commit in nfs_commit_unstable_pages() Message-ID: <20110610140459.GA8021@localhost> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Fri, 10 Jun 2011 14:05:25 +0000 (UTC) It's confusing to return success while redirtying the inode at the same time in ->write_inode(). Return -EAGAIN to indicate that we've not finished with this inode. Impact: it's a cleanup, not bug fix. CC: Christoph Hellwig Signed-off-by: Wu Fengguang --- fs/nfs/write.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- linux-next.orig/fs/nfs/write.c 2011-06-10 21:52:34.000000000 +0800 +++ linux-next/fs/nfs/write.c 2011-06-10 21:52:37.000000000 +0800 @@ -1521,7 +1521,7 @@ static int nfs_commit_unstable_pages(str { struct nfs_inode *nfsi = NFS_I(inode); int flags = FLUSH_SYNC; - int ret = 0; + int ret = -EAGAIN; if (wbc->sync_mode == WB_SYNC_NONE) { /* Don't commit yet if this is a non-blocking flush and there