diff options
author | takawata <takawata@FreeBSD.org> | 2004-10-02 17:17:04 +0000 |
---|---|---|
committer | takawata <takawata@FreeBSD.org> | 2004-10-02 17:17:04 +0000 |
commit | 2e6eb5bbd184757f78aa4757167b32771ad9f6a3 (patch) | |
tree | dadda21c083c50c04784b0e2cfe58b119ced453a | |
parent | 631ed342dc5c623dfe87e11b7eb9e157ef574de0 (diff) | |
download | FreeBSD-src-2e6eb5bbd184757f78aa4757167b32771ad9f6a3.zip FreeBSD-src-2e6eb5bbd184757f78aa4757167b32771ad9f6a3.tar.gz |
Fix a problem when you try to mount a directory on another directory
belongs to the same filesystem. In this problem, getcwd(3) will fail.
I found the problem two years ago and I have forgotten to merge.
http://docs.FreeBSD.org/cgi/mid.cgi?200202251435.XAA91094
-rw-r--r-- | sys/fs/unionfs/union_vnops.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/fs/unionfs/union_vnops.c b/sys/fs/unionfs/union_vnops.c index c8240e9..89673df 100644 --- a/sys/fs/unionfs/union_vnops.c +++ b/sys/fs/unionfs/union_vnops.c @@ -972,6 +972,8 @@ union_getattr(ap) union_newsize(ap->a_vp, VNOVAL, vap->va_size); } + ap->a_vap->va_fsid = ap->a_vp->v_mount->mnt_stat.f_fsid.val[0]; + if ((vap != ap->a_vap) && (vap->va_type == VDIR)) ap->a_vap->va_nlink += vap->va_nlink; return (0); |