From: NeilBrown <neilb@suse.de> To: Andrew Morton <akpm@linux-foundation.org> Cc: nfs@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: [PATCH 001 of 4] knfsd: Fix return value for writes to some files in 'nfsd' filesystem. Date: Mon, 12 Feb 2007 16:49:41 +1100 [thread overview] Message-ID: <1070212054941.26775@suse.de> (raw) In-Reply-To: 20070212164133.26352.patches@notabene 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 <neilb@suse.de> ### 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; }
WARNING: multiple messages have this Message-ID (diff)
From: NeilBrown <neilb@suse.de> To: Andrew Morton <akpm@linux-foundation.org> Cc: nfs@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: [PATCH 001 of 4] knfsd: Fix return value for writes to some files in 'nfsd' filesystem. Date: Mon, 12 Feb 2007 16:49:41 +1100 [thread overview] Message-ID: <1070212054941.26775@suse.de> (raw) In-Reply-To: 20070212164133.26352.patches@notabene 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 <neilb@suse.de> ### 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; } ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ NFS maillist - NFS@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nfs
next prev parent reply other threads:[~2007-02-12 5:50 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2007-02-12 5:49 [PATCH 000 of 4] knfsd: fixes and enhancements for 2.6.21 NeilBrown 2007-02-12 5:49 ` NeilBrown 2007-02-12 5:49 ` NeilBrown [this message] 2007-02-12 5:49 ` [PATCH 001 of 4] knfsd: Fix return value for writes to some files in 'nfsd' filesystem NeilBrown 2007-02-12 5:49 ` [PATCH 002 of 4] knfsd: Tidy up choice of filesystem-identifier when creating a filehandle NeilBrown 2007-02-12 5:49 ` NeilBrown 2007-02-12 5:49 ` [PATCH 003 of 4] knfsd: Add some new fsid types NeilBrown 2007-02-12 5:49 ` NeilBrown 2007-02-12 5:49 ` [PATCH 004 of 4] knfsd: Allow the server to provide a gid list when using AUTH_UNIX authentication NeilBrown 2007-02-12 5:49 ` NeilBrown
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1070212054941.26775@suse.de \ --to=neilb@suse.de \ --cc=akpm@linux-foundation.org \ --cc=linux-kernel@vger.kernel.org \ --cc=nfs@lists.sourceforge.net \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.