nfs_subs.c (221973) | nfs_subs.c (230394) |
---|---|
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/nfsclient/nfs_subs.c 221973 2011-05-15 20:52:43Z rmacklem $"); | 36__FBSDID("$FreeBSD: head/sys/nfsclient/nfs_subs.c 230394 2012-01-20 20:02:01Z jhb $"); |
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_kdtrace.h" --- 928 unchanged lines hidden (view full) --- 973 t1 = nfs_loadattrcache(&ttvp, md, dpos, va, 0); 974 if (t1 != 0) 975 return t1; 976 *v = ttvp; 977 return 0; 978} 979 980int | 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_kdtrace.h" --- 928 unchanged lines hidden (view full) --- 973 t1 = nfs_loadattrcache(&ttvp, md, dpos, va, 0); 974 if (t1 != 0) 975 return t1; 976 *v = ttvp; 977 return 0; 978} 979 980int |
981nfsm_postop_attr_xx(struct vnode **v, int *f, struct mbuf **md, 982 caddr_t *dpos) | 981nfsm_postop_attr_xx(struct vnode **v, int *f, struct vattr *va, 982 struct mbuf **md, caddr_t *dpos) |
983{ 984 u_int32_t *tl; 985 int t1; 986 987 struct vnode *ttvp = *v; 988 tl = nfsm_dissect_xx(NFSX_UNSIGNED, md, dpos); 989 if (tl == NULL) 990 return EBADRPC; 991 *f = fxdr_unsigned(int, *tl); 992 if (*f != 0) { | 983{ 984 u_int32_t *tl; 985 int t1; 986 987 struct vnode *ttvp = *v; 988 tl = nfsm_dissect_xx(NFSX_UNSIGNED, md, dpos); 989 if (tl == NULL) 990 return EBADRPC; 991 *f = fxdr_unsigned(int, *tl); 992 if (*f != 0) { |
993 t1 = nfs_loadattrcache(&ttvp, md, dpos, NULL, 1); | 993 t1 = nfs_loadattrcache(&ttvp, md, dpos, va, 1); |
994 if (t1 != 0) { 995 *f = 0; 996 return t1; 997 } 998 *v = ttvp; 999 } 1000 return 0; 1001} --- 13 unchanged lines hidden (view full) --- 1015 if (tl == NULL) 1016 return EBADRPC; 1017 mtx_lock(&(VTONFS(*v))->n_mtx); 1018 if (*f) 1019 ttretf = (VTONFS(*v)->n_mtime.tv_sec == fxdr_unsigned(u_int32_t, *(tl + 2)) && 1020 VTONFS(*v)->n_mtime.tv_nsec == fxdr_unsigned(u_int32_t, *(tl + 3))); 1021 mtx_unlock(&(VTONFS(*v))->n_mtx); 1022 } | 994 if (t1 != 0) { 995 *f = 0; 996 return t1; 997 } 998 *v = ttvp; 999 } 1000 return 0; 1001} --- 13 unchanged lines hidden (view full) --- 1015 if (tl == NULL) 1016 return EBADRPC; 1017 mtx_lock(&(VTONFS(*v))->n_mtx); 1018 if (*f) 1019 ttretf = (VTONFS(*v)->n_mtime.tv_sec == fxdr_unsigned(u_int32_t, *(tl + 2)) && 1020 VTONFS(*v)->n_mtime.tv_nsec == fxdr_unsigned(u_int32_t, *(tl + 3))); 1021 mtx_unlock(&(VTONFS(*v))->n_mtx); 1022 } |
1023 t1 = nfsm_postop_attr_xx(v, &ttattrf, md, dpos); | 1023 t1 = nfsm_postop_attr_xx(v, &ttattrf, NULL, md, dpos); |
1024 if (t1) 1025 return t1; 1026 if (*f) 1027 *f = ttretf; 1028 else 1029 *f = ttattrf; 1030 return 0; 1031} --- 116 unchanged lines hidden --- | 1024 if (t1) 1025 return t1; 1026 if (*f) 1027 *f = ttretf; 1028 else 1029 *f = ttattrf; 1030 return 0; 1031} --- 116 unchanged lines hidden --- |