From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933005AbXBLFuS (ORCPT ); Mon, 12 Feb 2007 00:50:18 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933001AbXBLFuS (ORCPT ); Mon, 12 Feb 2007 00:50:18 -0500 Received: from cantor2.suse.de ([195.135.220.15]:45309 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933005AbXBLFuR (ORCPT ); Mon, 12 Feb 2007 00:50:17 -0500 From: NeilBrown To: Andrew Morton Date: Mon, 12 Feb 2007 16:49:41 +1100 Message-Id: <1070212054941.26775@suse.de> X-face: [Gw_3E*Gng}4rRrKRYotwlE?.2|**#s9D Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Most files in the 'nfsd' filesystem are transactional. When you write, a reply is generated that can be read back only on the same 'file'. If the reply has zero length, the 'write' will incorrectly return a value of '0' instead of the length that was written. This causes 'rpc.nfsd' to give an annoying warning. This patch fixes the test. Signed-off-by: Neil Brown ### Diffstat output ./fs/nfsd/nfsctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff .prev/fs/nfsd/nfsctl.c ./fs/nfsd/nfsctl.c --- .prev/fs/nfsd/nfsctl.c 2007-02-12 16:39:20.000000000 +1100 +++ ./fs/nfsd/nfsctl.c 2007-02-12 16:39:33.000000000 +1100 @@ -123,7 +123,7 @@ static ssize_t nfsctl_transaction_write( return PTR_ERR(data); rv = write_op[ino](file, data, size); - if (rv>0) { + if (rv >= 0) { simple_transaction_set(file, rv); rv = size; }