diff options
author | kato <kato@FreeBSD.org> | 1997-04-16 03:08:34 +0000 |
---|---|---|
committer | kato <kato@FreeBSD.org> | 1997-04-16 03:08:34 +0000 |
commit | 94dc06fdd46cc83f93e272a25cb799f9b09cf623 (patch) | |
tree | 6b43eb74d2f1a391d592db9d43c99bcd15fdb747 /sys/fs/unionfs/union_vnops.c | |
parent | bbb4a1f3a54fb1ead8610f8e4a8bdbe799716fda (diff) | |
download | FreeBSD-src-94dc06fdd46cc83f93e272a25cb799f9b09cf623.zip FreeBSD-src-94dc06fdd46cc83f93e272a25cb799f9b09cf623.tar.gz |
Undo previous commit to avoid panic, and fix order of argument of
VOP_LINK(). The reason of strange behavior was wrong order of the
argument, that is, the operation
# ln foo bar
in a union fs tried to do
# ln bar foo
in ufs layer.
Now we can make a link in a union fs.
Diffstat (limited to 'sys/fs/unionfs/union_vnops.c')
-rw-r--r-- | sys/fs/unionfs/union_vnops.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/sys/fs/unionfs/union_vnops.c b/sys/fs/unionfs/union_vnops.c index 4b70f2c..eb80cd0 100644 --- a/sys/fs/unionfs/union_vnops.c +++ b/sys/fs/unionfs/union_vnops.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * @(#)union_vnops.c 8.32 (Berkeley) 6/23/95 - * $Id: union_vnops.c,v 1.23 1997/04/14 05:13:55 kato Exp $ + * $Id: union_vnops.c,v 1.24 1997/04/15 12:56:57 kato Exp $ */ #include <sys/param.h> @@ -1058,7 +1058,6 @@ union_link(ap) struct union_node *un; struct vnode *vp; struct vnode *tdvp; - int isvnunlocked = 0; un = VTOUNION(ap->a_tdvp); @@ -1097,19 +1096,7 @@ union_link(ap) un->un_flags |= UN_KLOCK; vput(ap->a_tdvp); - /* - * XXX -- This is a quick-hack to avoid panic. Problem still remains! - * The process which access the union filesystem will be hang-up after - * making link in the union fs. - */ - if (VOP_ISLOCKED(tdvp) && (tdvp->v_op != union_vnodeop_p)) { - isvnunlocked = 1; - VOP_UNLOCK(tdvp, 0, p); - } - error = VOP_LINK(vp, tdvp, cnp); - if (isvnunlocked) - vn_lock(tdvp, LK_EXCLUSIVE | LK_RETRY, p); - return error; + return (VOP_LINK(tdvp, vp, cnp)); } int |