summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Feldman <green@FreeBSD.org>2004-01-16 22:55:25 +0000
committerBrian Feldman <green@FreeBSD.org>2004-01-16 22:55:25 +0000
commit6d8e1f823b50699e33c3ace8aff2451a6f524c2f (patch)
tree18a1e1dff401664153008948326af973471e6577
parent478382096e31a11b42facf78ae207d9a66dc922e (diff)
Notes
-rw-r--r--sys/fs/unionfs/union_vnops.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/fs/unionfs/union_vnops.c b/sys/fs/unionfs/union_vnops.c
index 603acd1f7386..3a5838e6e3af 100644
--- a/sys/fs/unionfs/union_vnops.c
+++ b/sys/fs/unionfs/union_vnops.c
@@ -1224,7 +1224,10 @@ union_remove(ap)
if ((uppervp = union_lock_upper(un, td)) != NULLVP) {
if (union_dowhiteout(un, cnp->cn_cred, td))
cnp->cn_flags |= DOWHITEOUT;
- error = VOP_REMOVE(upperdvp, uppervp, cnp);
+ if (cnp->cn_flags & DOWHITEOUT) /* XXX fs corruption */
+ error = EOPNOTSUPP;
+ else
+ error = VOP_REMOVE(upperdvp, uppervp, cnp);
if (!error)
union_removed_upper(un);
union_unlock_upper(uppervp, td);
@@ -1538,7 +1541,10 @@ union_rmdir(ap)
if ((uppervp = union_lock_upper(un, td)) != NULLVP) {
if (union_dowhiteout(un, cnp->cn_cred, td))
cnp->cn_flags |= DOWHITEOUT;
- error = VOP_RMDIR(upperdvp, uppervp, ap->a_cnp);
+ if (cnp->cn_flags & DOWHITEOUT) /* XXX fs corruption */
+ error = EOPNOTSUPP;
+ else
+ error = VOP_RMDIR(upperdvp, uppervp, ap->a_cnp);
if (!error)
union_removed_upper(un);
union_unlock_upper(uppervp, td);