From: Trond Myklebust Subject: Re: Q. NFS, return value of close(2) Date: Wed, 11 Aug 2010 12:31:39 -0400 Message-ID: <1281544299.3262.2.camel@heimdal.trondhjem.org> References: <4387.1281540989@jrobl> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Cc: linux-fsdevel@vger.kernel.org To: "J. R. Okajima" Return-path: Received: from mx2.netapp.com ([216.240.18.37]:63964 "EHLO mx2.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753545Ab0HKQbm convert rfc822-to-8bit (ORCPT ); Wed, 11 Aug 2010 12:31:42 -0400 In-Reply-To: <4387.1281540989@jrobl> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu, 2010-08-12 at 00:36 +0900, J. R. Okajima wrote: > By the commit af7fa16 "NFS: Fix up the fsync code", close(2) seems to > return the non-zero value even if it goes well, eg. the number of page via > > nfs_file_flush() > vfs_fsync() > nfs_file_fsync() > nfs_commit_inode() > nfs_scan_commit() > nfs_scan_list() > > Should nfs_file_fsync() return 0 when "status" is positive? > > { > status = nfs_commit_inode(inode, FLUSH_SYNC); > ;;; > - if (!ret) > + if (!ret && status < 0) > ret = status; > } > > > J. R. Okajima Yes. That looks correct. Can you resend with an appropriate signed-off line, etc.? Cheers Trond