Deleted Added
full compact
nfs_serv.c (46155) nfs_serv.c (46568)
1/*
2 * Copyright (c) 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Rick Macklem at The University of Guelph.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 *
36 * @(#)nfs_serv.c 8.8 (Berkeley) 7/31/95
1/*
2 * Copyright (c) 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Rick Macklem at The University of Guelph.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 *
36 * @(#)nfs_serv.c 8.8 (Berkeley) 7/31/95
37 * $Id: nfs_serv.c,v 1.74 1999/04/27 11:17:49 phk Exp $
37 * $Id: nfs_serv.c,v 1.75 1999/04/28 11:37:54 phk Exp $
38 */
39
40/*
41 * nfs version 2 and 3 server calls to vnode ops
42 * - these routines generally have 3 phases
43 * 1 - break down and validate rpc request in mbuf list
44 * 2 - do the vnode ops for the request
45 * (surprisingly ?? many are very similar to syscalls in vfs_syscalls.c)

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

1916 }
1917 if (fvp->v_mount != tdvp->v_mount) {
1918 if (v3)
1919 error = EXDEV;
1920 else
1921 error = ENOTEMPTY;
1922 goto out;
1923 }
38 */
39
40/*
41 * nfs version 2 and 3 server calls to vnode ops
42 * - these routines generally have 3 phases
43 * 1 - break down and validate rpc request in mbuf list
44 * 2 - do the vnode ops for the request
45 * (surprisingly ?? many are very similar to syscalls in vfs_syscalls.c)

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

1916 }
1917 if (fvp->v_mount != tdvp->v_mount) {
1918 if (v3)
1919 error = EXDEV;
1920 else
1921 error = ENOTEMPTY;
1922 goto out;
1923 }
1924 if (fvp == tdvp)
1924 if (fvp == tdvp) {
1925 if (v3)
1926 error = EINVAL;
1927 else
1928 error = ENOTEMPTY;
1925 if (v3)
1926 error = EINVAL;
1927 else
1928 error = ENOTEMPTY;
1929 }
1929 /*
1930 * If source is the same as the destination (that is the
1931 * same vnode with the same name in the same directory),
1932 * then there is nothing to do.
1933 */
1934 if (fvp == tvp && fromnd.ni_dvp == tdvp &&
1935 fromnd.ni_cnd.cn_namelen == tond.ni_cnd.cn_namelen &&
1936 !bcmp(fromnd.ni_cnd.cn_nameptr, tond.ni_cnd.cn_nameptr,

--- 1545 unchanged lines hidden ---
1930 /*
1931 * If source is the same as the destination (that is the
1932 * same vnode with the same name in the same directory),
1933 * then there is nothing to do.
1934 */
1935 if (fvp == tvp && fromnd.ni_dvp == tdvp &&
1936 fromnd.ni_cnd.cn_namelen == tond.ni_cnd.cn_namelen &&
1937 !bcmp(fromnd.ni_cnd.cn_nameptr, tond.ni_cnd.cn_nameptr,

--- 1545 unchanged lines hidden ---