kern/180236: commit references a PR
dfilter service
dfilter at FreeBSD.ORG
Thu Jul 4 19:10:01 UTC 2013
The following reply was made to PR kern/180236; it has been noted by GNATS.
From: dfilter at FreeBSD.ORG (dfilter service)
To: bug-followup at FreeBSD.org
Cc:
Subject: Re: kern/180236: commit references a PR
Date: Thu, 4 Jul 2013 19:01:25 +0000 (UTC)
Author: kib
Date: Thu Jul 4 19:01:18 2013
New Revision: 252714
URL: http://svnweb.freebsd.org/changeset/base/252714
Log:
The tvp vnode on rename is usually unlinked. Drop the cached null
vnode for tvp to allow the free of the lower vnode, if needed.
PR: kern/180236
Tested by: smh
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Modified:
head/sys/fs/nullfs/null_vnops.c
Modified: head/sys/fs/nullfs/null_vnops.c
==============================================================================
--- head/sys/fs/nullfs/null_vnops.c Thu Jul 4 18:59:58 2013 (r252713)
+++ head/sys/fs/nullfs/null_vnops.c Thu Jul 4 19:01:18 2013 (r252714)
@@ -554,6 +554,7 @@ null_rename(struct vop_rename_args *ap)
struct vnode *fvp = ap->a_fvp;
struct vnode *fdvp = ap->a_fdvp;
struct vnode *tvp = ap->a_tvp;
+ struct null_node *tnn;
/* Check for cross-device rename. */
if ((fvp->v_mount != tdvp->v_mount) ||
@@ -568,7 +569,11 @@ null_rename(struct vop_rename_args *ap)
vrele(fvp);
return (EXDEV);
}
-
+
+ if (tvp != NULL) {
+ tnn = VTONULL(tvp);
+ tnn->null_flags |= NULLV_DROP;
+ }
return (null_bypass((struct vop_generic_args *)ap));
}
_______________________________________________
svn-src-all at freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe at freebsd.org"
More information about the freebsd-fs
mailing list