Module Name: src
Committed By: christos
Date: Fri Oct 7 21:09:57 UTC 2016
Modified Files:
src/usr.sbin/puffs/mount_psshfs: node.c
Log Message:
PR/514612: Mateusz Paszwa: When no more data, bail out (reading from empty
files) instead of stuck looping.
To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/usr.sbin/puffs/mount_psshfs/node.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.sbin/puffs/mount_psshfs/node.c
diff -u src/usr.sbin/puffs/mount_psshfs/node.c:1.64 src/usr.sbin/puffs/mount_psshfs/node.c:1.65
--- src/usr.sbin/puffs/mount_psshfs/node.c:1.64 Fri Jan 20 17:07:58 2012
+++ src/usr.sbin/puffs/mount_psshfs/node.c Fri Oct 7 17:09:57 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: node.c,v 1.64 2012/01/20 22:07:58 jakllsch Exp $ */
+/* $NetBSD: node.c,v 1.65 2016/10/07 21:09:57 christos Exp $ */
/*
* Copyright (c) 2006-2009 Antti Kantee. All Rights Reserved.
@@ -27,7 +27,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: node.c,v 1.64 2012/01/20 22:07:58 jakllsch Exp $");
+__RCSID("$NetBSD: node.c,v 1.65 2016/10/07 21:09:57 christos Exp $");
#endif /* !lint */
#include <assert.h>
@@ -563,7 +563,7 @@ again:
TAILQ_REMOVE(&psn->pw, pwp, pw_entries);
}
- if (rv == 0 && *resid > 0) {
+ if (rv == 0 && *resid > 0 && readlen > 0) {
reqid = NEXTREQ(pctx);
psbuf_recycleout(pb);
goto again;