Date: Thu, 21 Apr 2011 13:33:00 +0300 From: Kostik Belousov <kostikbel@gmail.com> To: Rick Macklem <rmacklem@freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r220906 - head/sys/fs/nfsclient Message-ID: <20110421103300.GK48734@deviant.kiev.zoral.com.ua> In-Reply-To: <201104202325.p3KNPIK6070781@svn.freebsd.org> References: <201104202325.p3KNPIK6070781@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--b/6gol1SqNxk8K3i Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 20, 2011 at 11:25:18PM +0000, Rick Macklem wrote: > Author: rmacklem > Date: Wed Apr 20 23:25:18 2011 > New Revision: 220906 > URL: http://svn.freebsd.org/changeset/base/220906 >=20 > Log: > Add a check for VI_DOOMED at the beginning of nfscl_request() > so that it won't try and use vp->v_mount to do an RPC during > a forced dismount. There needs to be at least one more kernel > commit, plus a change to the umount(8) command before forced > dismounts will work for the experimental NFS client. > =20 > MFC after: 2 weeks >=20 > Modified: > head/sys/fs/nfsclient/nfs_clport.c >=20 > Modified: head/sys/fs/nfsclient/nfs_clport.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/fs/nfsclient/nfs_clport.c Wed Apr 20 23:20:00 2011 (r220905) > +++ head/sys/fs/nfsclient/nfs_clport.c Wed Apr 20 23:25:18 2011 (r220906) > @@ -819,6 +819,8 @@ nfscl_request(struct nfsrv_descript *nd, > int ret, vers; > struct nfsmount *nmp; > =20 > + if ((vp->v_iflag & VI_DOOMED) !=3D 0) > + return (EPERM); > nmp =3D VFSTONFS(vp->v_mount); > if (nd->nd_flag & ND_NFSV4) > vers =3D NFS_VER4; Is vnode lock held at this point ? If yes, I suggest to add ASSERT_VOP_{E,}LOCKED() assertion both to enforce the invariant, and to document the state to readers of the code. --b/6gol1SqNxk8K3i Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAk2wB9wACgkQC3+MBN1Mb4i/BgCfSMLXRIF9fwGgyDx6Kth+eSdf Ja8AoM2Ec7eNjJrSMf8y8cPbvwNOPLAM =AzcF -----END PGP SIGNATURE----- --b/6gol1SqNxk8K3i--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110421103300.GK48734>