nfs_srvsubs.c (157325) | nfs_srvsubs.c (157391) |
---|---|
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 --- 19 unchanged lines hidden (view full) --- 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 * @(#)nfs_subs.c 8.8 (Berkeley) 5/22/95 33 */ 34 35#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 --- 19 unchanged lines hidden (view full) --- 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 * @(#)nfs_subs.c 8.8 (Berkeley) 5/22/95 33 */ 34 35#include <sys/cdefs.h> |
36__FBSDID("$FreeBSD: head/sys/nfsserver/nfs_srvsubs.c 157325 2006-03-31 03:54:20Z jeff $"); | 36__FBSDID("$FreeBSD: head/sys/nfsserver/nfs_srvsubs.c 157391 2006-04-02 04:24:57Z cel $"); |
37 38/* 39 * These functions support the macros and help fiddle mbuf chains for 40 * the nfs op functions. They do things like create the rpc header and 41 * copy data between mbuf chains and uio lists. 42 */ 43 44#include "opt_inet6.h" --- 1349 unchanged lines hidden (view full) --- 1394 } 1395 return 0; 1396} 1397 1398int 1399nfsm_srvsattr_xx(struct vattr *a, struct mbuf **md, caddr_t *dpos) 1400{ 1401 u_int32_t *tl; | 37 38/* 39 * These functions support the macros and help fiddle mbuf chains for 40 * the nfs op functions. They do things like create the rpc header and 41 * copy data between mbuf chains and uio lists. 42 */ 43 44#include "opt_inet6.h" --- 1349 unchanged lines hidden (view full) --- 1394 } 1395 return 0; 1396} 1397 1398int 1399nfsm_srvsattr_xx(struct vattr *a, struct mbuf **md, caddr_t *dpos) 1400{ 1401 u_int32_t *tl; |
1402 int toclient = 0; |
|
1402 1403 NFSD_LOCK_DONTCARE(); 1404 1405 tl = nfsm_dissect_xx_nonblock(NFSX_UNSIGNED, md, dpos); 1406 if (tl == NULL) 1407 return EBADRPC; 1408 if (*tl == nfsrv_nfs_true) { 1409 tl = nfsm_dissect_xx_nonblock(NFSX_UNSIGNED, md, dpos); --- 32 unchanged lines hidden (view full) --- 1442 if (tl == NULL) 1443 return EBADRPC; 1444 switch (fxdr_unsigned(int, *tl)) { 1445 case NFSV3SATTRTIME_TOCLIENT: 1446 tl = nfsm_dissect_xx_nonblock(2 * NFSX_UNSIGNED, md, dpos); 1447 if (tl == NULL) 1448 return EBADRPC; 1449 fxdr_nfsv3time(tl, &(a)->va_atime); | 1403 1404 NFSD_LOCK_DONTCARE(); 1405 1406 tl = nfsm_dissect_xx_nonblock(NFSX_UNSIGNED, md, dpos); 1407 if (tl == NULL) 1408 return EBADRPC; 1409 if (*tl == nfsrv_nfs_true) { 1410 tl = nfsm_dissect_xx_nonblock(NFSX_UNSIGNED, md, dpos); --- 32 unchanged lines hidden (view full) --- 1443 if (tl == NULL) 1444 return EBADRPC; 1445 switch (fxdr_unsigned(int, *tl)) { 1446 case NFSV3SATTRTIME_TOCLIENT: 1447 tl = nfsm_dissect_xx_nonblock(2 * NFSX_UNSIGNED, md, dpos); 1448 if (tl == NULL) 1449 return EBADRPC; 1450 fxdr_nfsv3time(tl, &(a)->va_atime); |
1451 toclient = 1; |
|
1450 break; 1451 case NFSV3SATTRTIME_TOSERVER: 1452 getnanotime(&(a)->va_atime); | 1452 break; 1453 case NFSV3SATTRTIME_TOSERVER: 1454 getnanotime(&(a)->va_atime); |
1455 a->va_vaflags |= VA_UTIMES_NULL; |
|
1453 break; 1454 } 1455 tl = nfsm_dissect_xx_nonblock(NFSX_UNSIGNED, md, dpos); 1456 if (tl == NULL) 1457 return EBADRPC; 1458 switch (fxdr_unsigned(int, *tl)) { 1459 case NFSV3SATTRTIME_TOCLIENT: 1460 tl = nfsm_dissect_xx_nonblock(2 * NFSX_UNSIGNED, md, dpos); 1461 if (tl == NULL) 1462 return EBADRPC; 1463 fxdr_nfsv3time(tl, &(a)->va_mtime); | 1456 break; 1457 } 1458 tl = nfsm_dissect_xx_nonblock(NFSX_UNSIGNED, md, dpos); 1459 if (tl == NULL) 1460 return EBADRPC; 1461 switch (fxdr_unsigned(int, *tl)) { 1462 case NFSV3SATTRTIME_TOCLIENT: 1463 tl = nfsm_dissect_xx_nonblock(2 * NFSX_UNSIGNED, md, dpos); 1464 if (tl == NULL) 1465 return EBADRPC; 1466 fxdr_nfsv3time(tl, &(a)->va_mtime); |
1467 a->va_vaflags &= ~VA_UTIMES_NULL; |
|
1464 break; 1465 case NFSV3SATTRTIME_TOSERVER: 1466 getnanotime(&(a)->va_mtime); | 1468 break; 1469 case NFSV3SATTRTIME_TOSERVER: 1470 getnanotime(&(a)->va_mtime); |
1471 if (toclient == 0) 1472 a->va_vaflags |= VA_UTIMES_NULL; |
|
1467 break; 1468 } 1469 return 0; 1470} | 1473 break; 1474 } 1475 return 0; 1476} |