Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Apr 2011 23:35:16 +0000 (UTC)
From:      Rick Macklem <rmacklem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r220807 - head/sys/fs/nfsclient
Message-ID:  <201104182335.p3INZGv6088150@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rmacklem
Date: Mon Apr 18 23:35:16 2011
New Revision: 220807
URL: http://svn.freebsd.org/changeset/base/220807

Log:
  Revert r220761 since, as kib@ pointed out, the case of
  adding the check to nfsrpc_close() isn't useful. Also,
  the check in nfscl_getcl() must be more involved, since
  it needs to check before and after the acquisition of
  the refcnt on nfsc_lock, while the mutex that protects
  the client state data is held.

Modified:
  head/sys/fs/nfsclient/nfs_clrpcops.c
  head/sys/fs/nfsclient/nfs_clstate.c
  head/sys/fs/nfsclient/nfs_clvfsops.c

Modified: head/sys/fs/nfsclient/nfs_clrpcops.c
==============================================================================
--- head/sys/fs/nfsclient/nfs_clrpcops.c	Mon Apr 18 23:15:29 2011	(r220806)
+++ head/sys/fs/nfsclient/nfs_clrpcops.c	Mon Apr 18 23:35:16 2011	(r220807)
@@ -567,11 +567,6 @@ nfsrpc_close(vnode_t vp, int doclose, NF
 
 	if (vnode_vtype(vp) != VREG)
 		return (0);
-
-	/* For forced unmounts, just return. */
-	if ((vp->v_mount->mnt_kern_flag & MNTK_UNMOUNTF) != 0)
-		return (0);
-
 	if (doclose)
 		error = nfscl_doclose(vp, &clp, p);
 	else

Modified: head/sys/fs/nfsclient/nfs_clstate.c
==============================================================================
--- head/sys/fs/nfsclient/nfs_clstate.c	Mon Apr 18 23:15:29 2011	(r220806)
+++ head/sys/fs/nfsclient/nfs_clstate.c	Mon Apr 18 23:35:16 2011	(r220807)
@@ -692,10 +692,6 @@ nfscl_getcl(vnode_t vp, struct ucred *cr
 	int igotlock = 0, error, trystalecnt, clidinusedelay, i;
 	u_int16_t idlen = 0;
 
-	/* For forced unmounts, just return an error. */
-	if ((vnode_mount(vp)->mnt_kern_flag & MNTK_UNMOUNTF) != 0)
-		return (EPERM);
-
 	if (cred != NULL) {
 		getcredhostuuid(cred, uuid, sizeof uuid);
 		idlen = strlen(uuid);

Modified: head/sys/fs/nfsclient/nfs_clvfsops.c
==============================================================================
--- head/sys/fs/nfsclient/nfs_clvfsops.c	Mon Apr 18 23:15:29 2011	(r220806)
+++ head/sys/fs/nfsclient/nfs_clvfsops.c	Mon Apr 18 23:35:16 2011	(r220807)
@@ -1386,10 +1386,6 @@ nfs_sync(struct mount *mp, int waitfor)
 
 	td = curthread;
 
-	/* For a forced unmount, just return EPERM. */
-	if ((mp->mnt_kern_flag & MNTK_UNMOUNTF) != 0)
-		return (EPERM);
-
 	/*
 	 * Force stale buffer cache information to be flushed.
 	 */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201104182335.p3INZGv6088150>