From mboxrd@z Thu Jan 1 00:00:00 1970 From: "J. R. Okajima" Subject: Q. NFS, return value of close(2) Date: Thu, 12 Aug 2010 00:36:29 +0900 Message-ID: <4387.1281540989@jrobl> Cc: linux-fsdevel@vger.kernel.org To: Trond.Myklebust@netapp.com Return-path: Received: from mtoichi13.ns.itscom.net ([219.110.2.183]:52212 "EHLO mtoichi13.ns.itscom.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753193Ab0HKPhI (ORCPT ); Wed, 11 Aug 2010 11:37:08 -0400 Sender: linux-fsdevel-owner@vger.kernel.org List-ID: 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