nfs4proc.c (41ae6e714a6c25a9932d32a323e8c87f6bac4037) | nfs4proc.c (4ac7249ea5a0ceef9f8269f63f33cc873c3fac61) |
---|---|
1/* 2 * Server-side procedures for NFSv4. 3 * 4 * Copyright (c) 2002 The Regents of the University of Michigan. 5 * All rights reserved. 6 * 7 * Kendrick Smith <kmsmith@umich.edu> 8 * Andy Adamson <andros@umich.edu> --- 27 unchanged lines hidden (view full) --- 36#include <linux/slab.h> 37 38#include "idmap.h" 39#include "cache.h" 40#include "xdr4.h" 41#include "vfs.h" 42#include "current_stateid.h" 43#include "netns.h" | 1/* 2 * Server-side procedures for NFSv4. 3 * 4 * Copyright (c) 2002 The Regents of the University of Michigan. 5 * All rights reserved. 6 * 7 * Kendrick Smith <kmsmith@umich.edu> 8 * Andy Adamson <andros@umich.edu> --- 27 unchanged lines hidden (view full) --- 36#include <linux/slab.h> 37 38#include "idmap.h" 39#include "cache.h" 40#include "xdr4.h" 41#include "vfs.h" 42#include "current_stateid.h" 43#include "netns.h" |
44#include "acl.h" |
|
44 45#ifdef CONFIG_NFSD_V4_SECURITY_LABEL 46#include <linux/security.h> 47 48static inline void 49nfsd4_security_inode_setsecctx(struct svc_fh *resfh, struct xdr_netobj *label, u32 *bmval) 50{ 51 struct inode *inode = resfh->fh_dentry->d_inode; --- 1012 unchanged lines hidden (view full) --- 1064 return nfserr_jukebox; 1065 1066 p = buf; 1067 status = nfsd4_encode_fattr(&cstate->current_fh, 1068 cstate->current_fh.fh_export, 1069 cstate->current_fh.fh_dentry, &p, 1070 count, verify->ve_bmval, 1071 rqstp, 0); | 45 46#ifdef CONFIG_NFSD_V4_SECURITY_LABEL 47#include <linux/security.h> 48 49static inline void 50nfsd4_security_inode_setsecctx(struct svc_fh *resfh, struct xdr_netobj *label, u32 *bmval) 51{ 52 struct inode *inode = resfh->fh_dentry->d_inode; --- 1012 unchanged lines hidden (view full) --- 1065 return nfserr_jukebox; 1066 1067 p = buf; 1068 status = nfsd4_encode_fattr(&cstate->current_fh, 1069 cstate->current_fh.fh_export, 1070 cstate->current_fh.fh_dentry, &p, 1071 count, verify->ve_bmval, 1072 rqstp, 0); |
1072 /* 1073 * If nfsd4_encode_fattr() ran out of space, assume that's because 1074 * the attributes are longer (hence different) than those given: 1075 */ | 1073 1074 /* this means that nfsd4_encode_fattr() ran out of space */ |
1076 if (status == nfserr_resource) 1077 status = nfserr_not_same; 1078 if (status) 1079 goto out_kfree; 1080 1081 /* skip bitmap */ 1082 p = buf + 1 + ntohl(buf[0]); 1083 status = nfserr_not_same; --- 437 unchanged lines hidden (view full) --- 1521static inline u32 nfsd4_write_rsize(struct svc_rqst *rqstp, struct nfsd4_op *op) 1522{ 1523 return (op_encode_hdr_size + op_encode_verifier_maxsz) * sizeof(__be32); 1524} 1525 1526static inline u32 nfsd4_exchange_id_rsize(struct svc_rqst *rqstp, struct nfsd4_op *op) 1527{ 1528 return (op_encode_hdr_size + 2 + 1 + /* eir_clientid, eir_sequenceid */\ | 1075 if (status == nfserr_resource) 1076 status = nfserr_not_same; 1077 if (status) 1078 goto out_kfree; 1079 1080 /* skip bitmap */ 1081 p = buf + 1 + ntohl(buf[0]); 1082 status = nfserr_not_same; --- 437 unchanged lines hidden (view full) --- 1520static inline u32 nfsd4_write_rsize(struct svc_rqst *rqstp, struct nfsd4_op *op) 1521{ 1522 return (op_encode_hdr_size + op_encode_verifier_maxsz) * sizeof(__be32); 1523} 1524 1525static inline u32 nfsd4_exchange_id_rsize(struct svc_rqst *rqstp, struct nfsd4_op *op) 1526{ 1527 return (op_encode_hdr_size + 2 + 1 + /* eir_clientid, eir_sequenceid */\ |
1529 1 + 1 + /* eir_flags, spr_how */\ 1530 4 + /* spo_must_enforce & _allow with bitmap */\ | 1528 1 + 1 + 2 + /* eir_flags, spr_how, spo_must_enforce & _allow */\ |
1531 2 + /*eir_server_owner.so_minor_id */\ 1532 /* eir_server_owner.so_major_id<> */\ 1533 XDR_QUADLEN(NFS4_OPAQUE_LIMIT) + 1 +\ 1534 /* eir_server_scope<> */\ 1535 XDR_QUADLEN(NFS4_OPAQUE_LIMIT) + 1 +\ 1536 1 + /* eir_server_impl_id array length */\ 1537 0 /* ignored eir_server_impl_id contents */) * sizeof(__be32); 1538} --- 340 unchanged lines hidden (view full) --- 1879}; 1880 1881struct svc_version nfsd_version4 = { 1882 .vs_vers = 4, 1883 .vs_nproc = 2, 1884 .vs_proc = nfsd_procedures4, 1885 .vs_dispatch = nfsd_dispatch, 1886 .vs_xdrsize = NFS4_SVC_XDRSIZE, | 1529 2 + /*eir_server_owner.so_minor_id */\ 1530 /* eir_server_owner.so_major_id<> */\ 1531 XDR_QUADLEN(NFS4_OPAQUE_LIMIT) + 1 +\ 1532 /* eir_server_scope<> */\ 1533 XDR_QUADLEN(NFS4_OPAQUE_LIMIT) + 1 +\ 1534 1 + /* eir_server_impl_id array length */\ 1535 0 /* ignored eir_server_impl_id contents */) * sizeof(__be32); 1536} --- 340 unchanged lines hidden (view full) --- 1877}; 1878 1879struct svc_version nfsd_version4 = { 1880 .vs_vers = 4, 1881 .vs_nproc = 2, 1882 .vs_proc = nfsd_procedures4, 1883 .vs_dispatch = nfsd_dispatch, 1884 .vs_xdrsize = NFS4_SVC_XDRSIZE, |
1887 .vs_rpcb_optnl = 1, | |
1888}; 1889 1890/* 1891 * Local variables: 1892 * c-basic-offset: 8 1893 * End: 1894 */ | 1885}; 1886 1887/* 1888 * Local variables: 1889 * c-basic-offset: 8 1890 * End: 1891 */ |