Deleted Added
full compact
nfs_nfsdserv.c (191783) nfs_nfsdserv.c (191990)
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

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

27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
32 */
33
34#include <sys/cdefs.h>
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

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

27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
32 */
33
34#include <sys/cdefs.h>
35__FBSDID("$FreeBSD: head/sys/fs/nfsserver/nfs_nfsdserv.c 191783 2009-05-04 15:23:58Z rmacklem $");
35__FBSDID("$FreeBSD: head/sys/fs/nfsserver/nfs_nfsdserv.c 191990 2009-05-11 15:33:26Z attilio $");
36
37/*
38 * nfs version 2, 3 and 4 server calls to vnode ops
39 * - these routines generally have 3 phases
40 * 1 - break down and validate rpc request in mbuf list
41 * 2 - do the vnode ops for the request, usually by calling a nfsvno_XXX()
42 * function in nfsd_port.c
43 * 3 - build the rpc reply in an mbuf list

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

1902 struct statfs sfs;
1903 u_quad_t tval;
1904
1905 if (nd->nd_repstat) {
1906 nfsrv_postopattr(nd, getret, &at);
1907 return (0);
1908 }
1909 sf = &sfs;
36
37/*
38 * nfs version 2, 3 and 4 server calls to vnode ops
39 * - these routines generally have 3 phases
40 * 1 - break down and validate rpc request in mbuf list
41 * 2 - do the vnode ops for the request, usually by calling a nfsvno_XXX()
42 * function in nfsd_port.c
43 * 3 - build the rpc reply in an mbuf list

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

1902 struct statfs sfs;
1903 u_quad_t tval;
1904
1905 if (nd->nd_repstat) {
1906 nfsrv_postopattr(nd, getret, &at);
1907 return (0);
1908 }
1909 sf = &sfs;
1910 nd->nd_repstat = nfsvno_statfs(vp, sf, nd->nd_cred, p);
1910 nd->nd_repstat = nfsvno_statfs(vp, sf);
1911 getret = nfsvno_getattr(vp, &at, nd->nd_cred, p);
1912 vput(vp);
1913 if (nd->nd_flag & ND_NFSV3)
1914 nfsrv_postopattr(nd, getret, &at);
1915 if (nd->nd_repstat)
1916 return (0);
1917 if (nd->nd_flag & ND_NFSV2) {
1918 NFSM_BUILD(tl, u_int32_t *, NFSX_V2STATFS);

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

3280 int error = 0, ret, fhsize = NFSX_MYFH;
3281 struct nfsvattr nva;
3282 struct statfs sf;
3283 struct nfsfsinfo fs;
3284 fhandle_t fh;
3285
3286 nd->nd_repstat = nfsvno_getattr(vp, &nva, nd->nd_cred, p);
3287 if (!nd->nd_repstat)
1911 getret = nfsvno_getattr(vp, &at, nd->nd_cred, p);
1912 vput(vp);
1913 if (nd->nd_flag & ND_NFSV3)
1914 nfsrv_postopattr(nd, getret, &at);
1915 if (nd->nd_repstat)
1916 return (0);
1917 if (nd->nd_flag & ND_NFSV2) {
1918 NFSM_BUILD(tl, u_int32_t *, NFSX_V2STATFS);

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

3280 int error = 0, ret, fhsize = NFSX_MYFH;
3281 struct nfsvattr nva;
3282 struct statfs sf;
3283 struct nfsfsinfo fs;
3284 fhandle_t fh;
3285
3286 nd->nd_repstat = nfsvno_getattr(vp, &nva, nd->nd_cred, p);
3287 if (!nd->nd_repstat)
3288 nd->nd_repstat = nfsvno_statfs(vp, &sf, nd->nd_cred, p);
3288 nd->nd_repstat = nfsvno_statfs(vp, &sf);
3289 if (!nd->nd_repstat)
3290 nd->nd_repstat = nfsvno_getfh(vp, &fh, p);
3291 if (!nd->nd_repstat) {
3292 nfsvno_getfs(&fs, isdgram);
3293 error = nfsv4_loadattr(nd, vp, &nva, NULL, &fh, fhsize, NULL,
3294 &sf, NULL, &fs, NULL, 1, &ret, NULL, NULL, p, nd->nd_cred);
3295 if (!error) {
3296 if (nd->nd_procnum == NFSV4OP_NVERIFY) {

--- 71 unchanged lines hidden ---
3289 if (!nd->nd_repstat)
3290 nd->nd_repstat = nfsvno_getfh(vp, &fh, p);
3291 if (!nd->nd_repstat) {
3292 nfsvno_getfs(&fs, isdgram);
3293 error = nfsv4_loadattr(nd, vp, &nva, NULL, &fh, fhsize, NULL,
3294 &sf, NULL, &fs, NULL, 1, &ret, NULL, NULL, p, nd->nd_cred);
3295 if (!error) {
3296 if (nd->nd_procnum == NFSV4OP_NVERIFY) {

--- 71 unchanged lines hidden ---