Date: Thu, 5 Sep 2013 02:26:28 +0200 From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: Andriy Gapon <avg@FreeBSD.org> Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Xin LI <delphij@FreeBSD.org> Subject: Re: svn commit: r254982 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <20130905002628.GB1388@garage.freebsd.pl> In-Reply-To: <521DAAB6.4010008@FreeBSD.org> References: <201308280039.r7S0dmRK082241@svn.freebsd.org> <521DAAB6.4010008@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] 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)); > > > > - error = 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 == tdvp->v_mount) > > + error = zfs_rename(fdvp, ap->a_fcnp->cn_nameptr, tdvp, > > + ap->a_tcnp->cn_nameptr, ap->a_fcnp->cn_cred, NULL, 0); > > + else > > + error = EXDEV; > > > > if (tdvp == tvp) > > VN_RELE(tdvp); > > So, I am still not sure if that is important or not, but this change still misses > (tvp && (fvp->v_mount != 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. -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://mobter.com [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (FreeBSD) iEYEARECAAYFAlInz7QACgkQForvXbEpPzRPygCg5RH/ZkMzwZvBcSgHRnWJoa7w uv8AoJmb2IuWt0BHa3FfWect2u/ZTuzH =gFKN -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130905002628.GB1388>
