aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2007-02-14 03:33:11 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-14 11:09:53 -0500
commit8971a1016b9db4164c3c1b47ae1fde2818becf91 (patch)
tree8660185a73de37b3c590e39be15b874c190b858b /fs
parent754ce4f29937ba11f16afa41a648a30b0fc1f075 (diff)
[PATCH] knfsd: fix return value for writes to some files in 'nfsd' filesystem
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> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfsd/nfsctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
index eedf2e3990a9..71c686dc7257 100644
--- a/fs/nfsd/nfsctl.c
+++ b/fs/nfsd/nfsctl.c
@@ -123,7 +123,7 @@ static ssize_t nfsctl_transaction_write(struct file *file, const char __user *bu
123 return PTR_ERR(data); 123 return PTR_ERR(data);
124 124
125 rv = write_op[ino](file, data, size); 125 rv = write_op[ino](file, data, size);
126 if (rv>0) { 126 if (rv >= 0) {
127 simple_transaction_set(file, rv); 127 simple_transaction_set(file, rv);
128 rv = size; 128 rv = size;
129 } 129 }