Module Name: src
Committed By: matt
Date: Tue Apr 20 21:29:06 UTC 2010
Modified Files:
src/sys/nfs [matt-nb5-mips64]: nfs_serv.c nfs_socket.c
Log Message:
Pullin some NFS fixes from netbsd-5.
To generate a diff of this commit:
cvs rdiff -u -r1.138.16.1 -r1.138.16.1.4.1 src/sys/nfs/nfs_serv.c
cvs rdiff -u -r1.173.4.3 -r1.173.4.3.4.1 src/sys/nfs/nfs_socket.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/nfs/nfs_serv.c
diff -u src/sys/nfs/nfs_serv.c:1.138.16.1 src/sys/nfs/nfs_serv.c:1.138.16.1.4.1
--- src/sys/nfs/nfs_serv.c:1.138.16.1 Mon Apr 13 21:06:50 2009
+++ src/sys/nfs/nfs_serv.c Tue Apr 20 21:29:06 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: nfs_serv.c,v 1.138.16.1 2009/04/13 21:06:50 snj Exp $ */
+/* $NetBSD: nfs_serv.c,v 1.138.16.1.4.1 2010/04/20 21:29:06 matt Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -55,7 +55,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nfs_serv.c,v 1.138.16.1 2009/04/13 21:06:50 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nfs_serv.c,v 1.138.16.1.4.1 2010/04/20 21:29:06 matt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1859,7 +1859,7 @@
saved_uid = kauth_cred_geteuid(cred);
fromnd.ni_cnd.cn_cred = cred;
fromnd.ni_cnd.cn_nameiop = DELETE;
- fromnd.ni_cnd.cn_flags = LOCKPARENT | SAVESTART;
+ fromnd.ni_cnd.cn_flags = LOCKPARENT | SAVESTART | INRENAME;
error = nfs_namei(&fromnd, &fnsfh, len, slp, nam, &md,
&dpos, &fdirp, lwp, (nfsd->nd_flag & ND_KERBAUTH), false);
if (fdirp && v3) {
@@ -1930,7 +1930,8 @@
kauth_cred_seteuid(cred, saved_uid);
tond.ni_cnd.cn_cred = cred;
tond.ni_cnd.cn_nameiop = RENAME;
- tond.ni_cnd.cn_flags = LOCKPARENT | LOCKLEAF | NOCACHE | SAVESTART;
+ tond.ni_cnd.cn_flags = LOCKPARENT | LOCKLEAF | NOCACHE |
+ SAVESTART | INRENAME;
error = nfs_namei(&tond, &tnsfh, len2, slp, nam, &md,
&dpos, &tdirp, lwp, (nfsd->nd_flag & ND_KERBAUTH), false);
if (tdirp && v3) {
Index: src/sys/nfs/nfs_socket.c
diff -u src/sys/nfs/nfs_socket.c:1.173.4.3 src/sys/nfs/nfs_socket.c:1.173.4.3.4.1
--- src/sys/nfs/nfs_socket.c:1.173.4.3 Fri Feb 6 01:48:58 2009
+++ src/sys/nfs/nfs_socket.c Tue Apr 20 21:29:06 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: nfs_socket.c,v 1.173.4.3 2009/02/06 01:48:58 snj Exp $ */
+/* $NetBSD: nfs_socket.c,v 1.173.4.3.4.1 2010/04/20 21:29:06 matt Exp $ */
/*
* Copyright (c) 1989, 1991, 1993, 1995
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nfs_socket.c,v 1.173.4.3 2009/02/06 01:48:58 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nfs_socket.c,v 1.173.4.3.4.1 2010/04/20 21:29:06 matt Exp $");
#include "fs_nfs.h"
#include "opt_nfs.h"
@@ -1157,7 +1157,7 @@
/*
* Wait for the reply from our send or the timer's.
*/
- if (!error || error == EPIPE)
+ if (!error || error == EPIPE || error == EWOULDBLOCK)
error = nfs_reply(rep, lwp);
/*