summary |
tags |
clone url |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
df24bc6)
SCCS-vsn: sys/miscfs/union/union_subr.c 8.5
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)union_subr.c 8.4 (Berkeley) %G%
+ * @(#)union_subr.c 8.5 (Berkeley) %G%
*/
#include <sys/param.h>
*/
#include <sys/param.h>
#include <sys/file.h>
#include <sys/filedesc.h>
#include <sys/queue.h>
#include <sys/file.h>
#include <sys/filedesc.h>
#include <sys/queue.h>
#include <miscfs/union/union.h>
#ifdef DIAGNOSTIC
#include <miscfs/union/union.h>
#ifdef DIAGNOSTIC
struct union_node *un;
struct union_node **pp;
struct vnode *xlowervp = NULLVP;
struct union_node *un;
struct union_node **pp;
struct vnode *xlowervp = NULLVP;
+ struct union_mount *um = MOUNTTOUNIONMOUNT(mp);
int try;
if (uppervp == NULLVP && lowervp == NULLVP)
int try;
if (uppervp == NULLVP && lowervp == NULLVP)
+ /* detect the root vnode (and aliases) */
+ vflag = 0;
+ if ((uppervp == um->um_uppervp) &&
+ ((lowervp == NULLVP) || lowervp == um->um_lowervp)) {
+ if (lowervp == NULLVP) {
+ lowervp = um->um_lowervp;
+ VREF(lowervp);
+ }
+ vflag = VROOT;
+ }
+
loop:
for (try = 0; try < 3; try++) {
switch (try) {
loop:
for (try = 0; try < 3; try++) {
switch (try) {
MALLOC((*vpp)->v_data, void *, sizeof(struct union_node),
M_TEMP, M_WAITOK);
MALLOC((*vpp)->v_data, void *, sizeof(struct union_node),
M_TEMP, M_WAITOK);
+ (*vpp)->v_flag |= vflag;
if (uppervp)
(*vpp)->v_type = uppervp->v_type;
else
if (uppervp)
(*vpp)->v_type = uppervp->v_type;
else