summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_extattr.c
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>1999-02-27 07:06:05 +0000
committerjulian <julian@FreeBSD.org>1999-02-27 07:06:05 +0000
commit51809f03ebf6008e415c3f15a3c82c8e4ddb8e07 (patch)
tree6d4b99607d484bed9766353c8e73d18eb0c52ee7 /sys/kern/vfs_extattr.c
parent0dd31950cdce992fa20722e191aef96b3f8b3a8b (diff)
downloadFreeBSD-src-51809f03ebf6008e415c3f15a3c82c8e4ddb8e07.zip
FreeBSD-src-51809f03ebf6008e415c3f15a3c82c8e4ddb8e07.tar.gz
Fix code for union mounts
Accidentally deleted by peter when he extracted the unionfs stuff in 1.109 Submitted by: Tony Finch <dot@dotat.at>
Diffstat (limited to 'sys/kern/vfs_extattr.c')
-rw-r--r--sys/kern/vfs_extattr.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c
index 191b9f8..642dbd2 100644
--- a/sys/kern/vfs_extattr.c
+++ b/sys/kern/vfs_extattr.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_syscalls.c 8.13 (Berkeley) 4/15/94
- * $Id: vfs_syscalls.c,v 1.117 1999/02/16 10:49:49 dfr Exp $
+ * $Id: vfs_syscalls.c,v 1.118 1999/02/25 15:54:06 bde Exp $
*/
/* For 4.3 integer FS ID compatibility */
@@ -2756,6 +2756,17 @@ unionread:
if (error)
return (error);
}
+ if ((SCARG(uap, count) == auio.uio_resid) &&
+ (vp->v_flag & VROOT) &&
+ (vp->v_mount->mnt_flag & MNT_UNION)) {
+ struct vnode *tvp = vp;
+ vp = vp->v_mount->mnt_vnodecovered;
+ VREF(vp);
+ fp->f_data = (caddr_t) vp;
+ fp->f_offset = 0;
+ vrele(tvp);
+ goto unionread;
+ }
error = copyout((caddr_t)&loff, (caddr_t)SCARG(uap, basep),
sizeof(long));
p->p_retval[0] = SCARG(uap, count) - auio.uio_resid;
@@ -2822,6 +2833,17 @@ unionread:
if (error)
return (error);
}
+ if ((SCARG(uap, count) == auio.uio_resid) &&
+ (vp->v_flag & VROOT) &&
+ (vp->v_mount->mnt_flag & MNT_UNION)) {
+ struct vnode *tvp = vp;
+ vp = vp->v_mount->mnt_vnodecovered;
+ VREF(vp);
+ fp->f_data = (caddr_t) vp;
+ fp->f_offset = 0;
+ vrele(tvp);
+ goto unionread;
+ }
if (SCARG(uap, basep) != NULL) {
error = copyout((caddr_t)&loff, (caddr_t)SCARG(uap, basep),
sizeof(long));
OpenPOWER on IntegriCloud