summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_extattr.c
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>1999-03-03 02:35:51 +0000
committerjulian <julian@FreeBSD.org>1999-03-03 02:35:51 +0000
commitcaaaa6363b062987768a65519c536c68acb1a3c7 (patch)
treee76c3f8754045c1aa15bb0414ce43f87b8594c84 /sys/kern/vfs_extattr.c
parent9e3d479b9d7509856e6dc91e1c69dc2e9165b908 (diff)
downloadFreeBSD-src-caaaa6363b062987768a65519c536c68acb1a3c7.zip
FreeBSD-src-caaaa6363b062987768a65519c536c68acb1a3c7.tar.gz
Slight cleanup of code resurected for union mounts..
Submitted by: Tony Finch <dot@dotat.at>
Diffstat (limited to 'sys/kern/vfs_extattr.c')
-rw-r--r--sys/kern/vfs_extattr.c68
1 files changed, 35 insertions, 33 deletions
diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c
index 642dbd2..54dc30c 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.118 1999/02/25 15:54:06 bde Exp $
+ * $Id: vfs_syscalls.c,v 1.119 1999/02/27 07:06:05 julian Exp $
*/
/* For 4.3 integer FS ID compatibility */
@@ -2749,23 +2749,24 @@ unionread:
VOP_UNLOCK(vp, 0, p);
if (error)
return (error);
- if (union_dircheckp && SCARG(uap, count) == auio.uio_resid) {
- error = union_dircheckp(p, &vp, fp);
- if (error == -1)
+ if (SCARG(uap, count) == auio.uio_resid) {
+ if (union_dircheckp) {
+ error = union_dircheckp(p, &vp, fp);
+ if (error == -1)
+ goto unionread;
+ if (error)
+ return (error);
+ }
+ if ((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 (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));
@@ -2826,23 +2827,24 @@ unionread:
VOP_UNLOCK(vp, 0, p);
if (error)
return (error);
- if (union_dircheckp && SCARG(uap, count) == auio.uio_resid) {
- error = union_dircheckp(p, &vp, fp);
- if (error == -1)
+ if (SCARG(uap, count) == auio.uio_resid) {
+ if (union_dircheckp) {
+ error = union_dircheckp(p, &vp, fp);
+ if (error == -1)
+ goto unionread;
+ if (error)
+ return (error);
+ }
+ if ((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 (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),
OpenPOWER on IntegriCloud