summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/nfs/nfs_bio.c4
-rw-r--r--sys/nfs/nfs_common.c8
-rw-r--r--sys/nfs/nfs_subs.c8
-rw-r--r--sys/nfsclient/nfs_bio.c4
-rw-r--r--sys/nfsclient/nfs_subs.c8
-rw-r--r--sys/nfsserver/nfs_srvsubs.c8
6 files changed, 20 insertions, 20 deletions
diff --git a/sys/nfs/nfs_bio.c b/sys/nfs/nfs_bio.c
index 3486a78..5633891 100644
--- a/sys/nfs/nfs_bio.c
+++ b/sys/nfs/nfs_bio.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_bio.c 8.9 (Berkeley) 3/30/95
- * $Id: nfs_bio.c,v 1.57 1998/05/30 16:33:56 peter Exp $
+ * $Id: nfs_bio.c,v 1.58 1998/06/01 11:32:53 peter Exp $
*/
@@ -523,7 +523,7 @@ again:
&& uio->uio_offset >= np->n_direofoffset) {
return (0);
}
- lbn = uio->uio_offset / NFS_DIRBLKSIZ;
+ lbn = (uoff_t)uio->uio_offset / NFS_DIRBLKSIZ;
on = uio->uio_offset & (NFS_DIRBLKSIZ - 1);
bp = nfs_getcacheblk(vp, lbn, NFS_DIRBLKSIZ, p);
if (!bp)
diff --git a/sys/nfs/nfs_common.c b/sys/nfs/nfs_common.c
index b53f59d..f256959 100644
--- a/sys/nfs/nfs_common.c
+++ b/sys/nfs/nfs_common.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_subs.c 8.8 (Berkeley) 5/22/95
- * $Id: nfs_subs.c,v 1.60 1998/05/31 19:16:08 peter Exp $
+ * $Id: nfs_subs.c,v 1.61 1998/05/31 20:08:55 peter Exp $
*/
/*
@@ -2011,11 +2011,11 @@ nfs_getcookie(np, off, add)
register struct nfsdmap *dp, *dp2;
register int pos;
- pos = off / NFS_DIRBLKSIZ;
- if (pos == 0) {
+ pos = (uoff_t)off / NFS_DIRBLKSIZ;
+ if (pos == 0 || off < 0) {
#ifdef DIAGNOSTIC
if (add)
- panic("nfs getcookie add at 0");
+ panic("nfs getcookie add at <= 0");
#endif
return (&nfs_nullcookie);
}
diff --git a/sys/nfs/nfs_subs.c b/sys/nfs/nfs_subs.c
index b53f59d..f256959 100644
--- a/sys/nfs/nfs_subs.c
+++ b/sys/nfs/nfs_subs.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_subs.c 8.8 (Berkeley) 5/22/95
- * $Id: nfs_subs.c,v 1.60 1998/05/31 19:16:08 peter Exp $
+ * $Id: nfs_subs.c,v 1.61 1998/05/31 20:08:55 peter Exp $
*/
/*
@@ -2011,11 +2011,11 @@ nfs_getcookie(np, off, add)
register struct nfsdmap *dp, *dp2;
register int pos;
- pos = off / NFS_DIRBLKSIZ;
- if (pos == 0) {
+ pos = (uoff_t)off / NFS_DIRBLKSIZ;
+ if (pos == 0 || off < 0) {
#ifdef DIAGNOSTIC
if (add)
- panic("nfs getcookie add at 0");
+ panic("nfs getcookie add at <= 0");
#endif
return (&nfs_nullcookie);
}
diff --git a/sys/nfsclient/nfs_bio.c b/sys/nfsclient/nfs_bio.c
index 3486a78..5633891 100644
--- a/sys/nfsclient/nfs_bio.c
+++ b/sys/nfsclient/nfs_bio.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_bio.c 8.9 (Berkeley) 3/30/95
- * $Id: nfs_bio.c,v 1.57 1998/05/30 16:33:56 peter Exp $
+ * $Id: nfs_bio.c,v 1.58 1998/06/01 11:32:53 peter Exp $
*/
@@ -523,7 +523,7 @@ again:
&& uio->uio_offset >= np->n_direofoffset) {
return (0);
}
- lbn = uio->uio_offset / NFS_DIRBLKSIZ;
+ lbn = (uoff_t)uio->uio_offset / NFS_DIRBLKSIZ;
on = uio->uio_offset & (NFS_DIRBLKSIZ - 1);
bp = nfs_getcacheblk(vp, lbn, NFS_DIRBLKSIZ, p);
if (!bp)
diff --git a/sys/nfsclient/nfs_subs.c b/sys/nfsclient/nfs_subs.c
index b53f59d..f256959 100644
--- a/sys/nfsclient/nfs_subs.c
+++ b/sys/nfsclient/nfs_subs.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_subs.c 8.8 (Berkeley) 5/22/95
- * $Id: nfs_subs.c,v 1.60 1998/05/31 19:16:08 peter Exp $
+ * $Id: nfs_subs.c,v 1.61 1998/05/31 20:08:55 peter Exp $
*/
/*
@@ -2011,11 +2011,11 @@ nfs_getcookie(np, off, add)
register struct nfsdmap *dp, *dp2;
register int pos;
- pos = off / NFS_DIRBLKSIZ;
- if (pos == 0) {
+ pos = (uoff_t)off / NFS_DIRBLKSIZ;
+ if (pos == 0 || off < 0) {
#ifdef DIAGNOSTIC
if (add)
- panic("nfs getcookie add at 0");
+ panic("nfs getcookie add at <= 0");
#endif
return (&nfs_nullcookie);
}
diff --git a/sys/nfsserver/nfs_srvsubs.c b/sys/nfsserver/nfs_srvsubs.c
index b53f59d..f256959 100644
--- a/sys/nfsserver/nfs_srvsubs.c
+++ b/sys/nfsserver/nfs_srvsubs.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_subs.c 8.8 (Berkeley) 5/22/95
- * $Id: nfs_subs.c,v 1.60 1998/05/31 19:16:08 peter Exp $
+ * $Id: nfs_subs.c,v 1.61 1998/05/31 20:08:55 peter Exp $
*/
/*
@@ -2011,11 +2011,11 @@ nfs_getcookie(np, off, add)
register struct nfsdmap *dp, *dp2;
register int pos;
- pos = off / NFS_DIRBLKSIZ;
- if (pos == 0) {
+ pos = (uoff_t)off / NFS_DIRBLKSIZ;
+ if (pos == 0 || off < 0) {
#ifdef DIAGNOSTIC
if (add)
- panic("nfs getcookie add at 0");
+ panic("nfs getcookie add at <= 0");
#endif
return (&nfs_nullcookie);
}
OpenPOWER on IntegriCloud