Messages in this thread Patch in this message | | | From | NeilBrown <> | Date | Mon, 12 Feb 2007 16:49:41 +1100 | Subject | [PATCH 001 of 4] 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>
### 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; } - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |