From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 00:26:21 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D3E784F4; Thu, 5 Sep 2013 00:26:21 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (garage.dawidek.net [91.121.88.72]) by mx1.freebsd.org (Postfix) with ESMTP id 9849C252C; Thu, 5 Sep 2013 00:26:21 +0000 (UTC) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) by mail.dawidek.net (Postfix) with ESMTPSA id BA9F2E3E; Thu, 5 Sep 2013 02:20:52 +0200 (CEST) Date: Thu, 5 Sep 2013 02:26:28 +0200 From: Pawel Jakub Dawidek To: Andriy Gapon Subject: Re: svn commit: r254982 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <20130905002628.GB1388@garage.freebsd.pl> References: <201308280039.r7S0dmRK082241@svn.freebsd.org> <521DAAB6.4010008@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="IiVenqGWf+H9Y6IX" Content-Disposition: inline In-Reply-To: <521DAAB6.4010008@FreeBSD.org> X-OS: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Xin LI X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 00:26:21 -0000 --IiVenqGWf+H9Y6IX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Aug 28, 2013 at 10:45:58AM +0300, Andriy Gapon wrote: > on 28/08/2013 03:39 Xin LI said the following: > > @@ -6250,8 +6250,11 @@ zfs_freebsd_rename(ap) > > ASSERT(ap->a_fcnp->cn_flags & (SAVENAME|SAVESTART)); > > ASSERT(ap->a_tcnp->cn_flags & (SAVENAME|SAVESTART)); > > =20 > > - error =3D zfs_rename(fdvp, ap->a_fcnp->cn_nameptr, tdvp, > > - ap->a_tcnp->cn_nameptr, ap->a_fcnp->cn_cred, NULL, 0); > > + if (fdvp->v_mount =3D=3D tdvp->v_mount) > > + error =3D zfs_rename(fdvp, ap->a_fcnp->cn_nameptr, tdvp, > > + ap->a_tcnp->cn_nameptr, ap->a_fcnp->cn_cred, NULL, 0); > > + else > > + error =3D EXDEV; > > =20 > > if (tdvp =3D=3D tvp) > > VN_RELE(tdvp); >=20 > So, I am still not sure if that is important or not, but this change stil= l misses > (tvp && (fvp->v_mount !=3D tvp->v_mount)) > check as found in ufs_rename. Yes, it is important. This is the case where 'fvp' represents a directory and 'tvp' also represents an existing directory. It is then possible that tdvp and tvp belong to different mount points. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://mobter.com --IiVenqGWf+H9Y6IX Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (FreeBSD) iEYEARECAAYFAlInz7QACgkQForvXbEpPzRPygCg5RH/ZkMzwZvBcSgHRnWJoa7w uv8AoJmb2IuWt0BHa3FfWect2u/ZTuzH =gFKN -----END PGP SIGNATURE----- --IiVenqGWf+H9Y6IX--