vfs_syscalls.c (020024f3d28ec68648ecd71a4188c70b8b9f2553) vfs_syscalls.c (dd8c04f4c7b9354c57ae38ef2822d7ae408c6a62)
1/*
2 * Copyright (c) 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.

--- 1289 unchanged lines hidden (view full) ---

1298 vrele(nd.ni_vp);
1299 error = EEXIST;
1300 goto out;
1301 }
1302 VATTR_NULL(&vattr);
1303 vattr.va_mode = ACCESSPERMS &~ p->p_fd->fd_cmask;
1304 VOP_LEASE(nd.ni_dvp, p, p->p_ucred, LEASE_WRITE);
1305 error = VOP_SYMLINK(nd.ni_dvp, &nd.ni_vp, &nd.ni_cnd, &vattr, path);
1/*
2 * Copyright (c) 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.

--- 1289 unchanged lines hidden (view full) ---

1298 vrele(nd.ni_vp);
1299 error = EEXIST;
1300 goto out;
1301 }
1302 VATTR_NULL(&vattr);
1303 vattr.va_mode = ACCESSPERMS &~ p->p_fd->fd_cmask;
1304 VOP_LEASE(nd.ni_dvp, p, p->p_ucred, LEASE_WRITE);
1305 error = VOP_SYMLINK(nd.ni_dvp, &nd.ni_vp, &nd.ni_cnd, &vattr, path);
1306 if (error == 0)
1307 vput(nd.ni_vp);
1306 vput(nd.ni_dvp);
1307 ASSERT_VOP_UNLOCKED(nd.ni_dvp, "symlink");
1308 ASSERT_VOP_UNLOCKED(nd.ni_vp, "symlink");
1309out:
1310 zfree(namei_zone, path);
1311 return (error);
1312}
1313

--- 2021 unchanged lines hidden ---
1308 vput(nd.ni_dvp);
1309 ASSERT_VOP_UNLOCKED(nd.ni_dvp, "symlink");
1310 ASSERT_VOP_UNLOCKED(nd.ni_vp, "symlink");
1311out:
1312 zfree(namei_zone, path);
1313 return (error);
1314}
1315

--- 2021 unchanged lines hidden ---