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 <[email protected]>
### 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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]