nfs4state.c (876c553cb41026cb6ad3cef970a35e5f69c42a25) | nfs4state.c (7fe2a71dda349a1afa75781f0cc7975be9784d15) |
---|---|
1/* 2* Copyright (c) 2001 The Regents of the University of Michigan. 3* All rights reserved. 4* 5* Kendrick Smith <kmsmith@umich.edu> 6* Andy Adamson <kandros@umich.edu> 7* 8* Redistribution and use in source and binary forms, with or without --- 5046 unchanged lines hidden (view full) --- 5055static inline __be32 5056nfsd4_truncate(struct svc_rqst *rqstp, struct svc_fh *fh, 5057 struct nfsd4_open *open) 5058{ 5059 struct iattr iattr = { 5060 .ia_valid = ATTR_SIZE, 5061 .ia_size = 0, 5062 }; | 1/* 2* Copyright (c) 2001 The Regents of the University of Michigan. 3* All rights reserved. 4* 5* Kendrick Smith <kmsmith@umich.edu> 6* Andy Adamson <kandros@umich.edu> 7* 8* Redistribution and use in source and binary forms, with or without --- 5046 unchanged lines hidden (view full) --- 5055static inline __be32 5056nfsd4_truncate(struct svc_rqst *rqstp, struct svc_fh *fh, 5057 struct nfsd4_open *open) 5058{ 5059 struct iattr iattr = { 5060 .ia_valid = ATTR_SIZE, 5061 .ia_size = 0, 5062 }; |
5063 struct nfsd_attrs attrs = { 5064 .na_iattr = &iattr, 5065 }; |
|
5063 if (!open->op_truncate) 5064 return 0; 5065 if (!(open->op_share_access & NFS4_SHARE_ACCESS_WRITE)) 5066 return nfserr_inval; | 5066 if (!open->op_truncate) 5067 return 0; 5068 if (!(open->op_share_access & NFS4_SHARE_ACCESS_WRITE)) 5069 return nfserr_inval; |
5067 return nfsd_setattr(rqstp, fh, &iattr, 0, (time64_t)0); | 5070 return nfsd_setattr(rqstp, fh, &attrs, 0, (time64_t)0); |
5068} 5069 5070static __be32 nfs4_get_vfs_file(struct svc_rqst *rqstp, struct nfs4_file *fp, 5071 struct svc_fh *cur_fh, struct nfs4_ol_stateid *stp, 5072 struct nfsd4_open *open, bool new_stp) 5073{ 5074 struct nfsd_file *nf = NULL; 5075 __be32 status; --- 2989 unchanged lines hidden --- | 5071} 5072 5073static __be32 nfs4_get_vfs_file(struct svc_rqst *rqstp, struct nfs4_file *fp, 5074 struct svc_fh *cur_fh, struct nfs4_ol_stateid *stp, 5075 struct nfsd4_open *open, bool new_stp) 5076{ 5077 struct nfsd_file *nf = NULL; 5078 __be32 status; --- 2989 unchanged lines hidden --- |