@@ -2965,7 +2965,7 @@ static int nfs4_show_deleg(struct seq_file *s, struct nfs4_stid *st)
29652965 seq_puts (s , ": { type: deleg, " );
29662966
29672967 seq_printf (s , "access: %s" ,
2968- ds -> dl_type == NFS4_OPEN_DELEGATE_READ ? "r" : "w" );
2968+ ds -> dl_type == OPEN_DELEGATE_READ ? "r" : "w" );
29692969
29702970 /* XXX: lease time, whether it's being recalled. */
29712971
@@ -5581,7 +5581,7 @@ nfsd4_process_open1(struct nfsd4_compound_state *cstate,
55815581static inline __be32
55825582nfs4_check_delegmode (struct nfs4_delegation * dp , int flags )
55835583{
5584- if ((flags & WR_STATE ) && (dp -> dl_type == NFS4_OPEN_DELEGATE_READ ))
5584+ if ((flags & WR_STATE ) && (dp -> dl_type == OPEN_DELEGATE_READ ))
55855585 return nfserr_openmode ;
55865586 else
55875587 return nfs_ok ;
@@ -5823,7 +5823,7 @@ static struct file_lease *nfs4_alloc_init_lease(struct nfs4_delegation *dp,
58235823 return NULL ;
58245824 fl -> fl_lmops = & nfsd_lease_mng_ops ;
58255825 fl -> c .flc_flags = FL_DELEG ;
5826- fl -> c .flc_type = flag == NFS4_OPEN_DELEGATE_READ ? F_RDLCK : F_WRLCK ;
5826+ fl -> c .flc_type = flag == OPEN_DELEGATE_READ ? F_RDLCK : F_WRLCK ;
58275827 fl -> c .flc_owner = (fl_owner_t )dp ;
58285828 fl -> c .flc_pid = current -> tgid ;
58295829 fl -> c .flc_file = dp -> dl_stid .sc_file -> fi_deleg_file -> nf_file ;
@@ -5969,7 +5969,7 @@ nfs4_set_delegation(struct nfsd4_open *open, struct nfs4_ol_stateid *stp,
59695969 */
59705970 if ((open -> op_share_access & NFS4_SHARE_ACCESS_BOTH ) == NFS4_SHARE_ACCESS_BOTH ) {
59715971 nf = find_rw_file (fp );
5972- dl_type = NFS4_OPEN_DELEGATE_WRITE ;
5972+ dl_type = OPEN_DELEGATE_WRITE ;
59735973 }
59745974
59755975 /*
@@ -5978,7 +5978,7 @@ nfs4_set_delegation(struct nfsd4_open *open, struct nfs4_ol_stateid *stp,
59785978 */
59795979 if (!nf && (open -> op_share_access & NFS4_SHARE_ACCESS_READ )) {
59805980 nf = find_readable_file (fp );
5981- dl_type = NFS4_OPEN_DELEGATE_READ ;
5981+ dl_type = OPEN_DELEGATE_READ ;
59825982 }
59835983
59845984 if (!nf )
@@ -6067,7 +6067,7 @@ nfs4_set_delegation(struct nfsd4_open *open, struct nfs4_ol_stateid *stp,
60676067
60686068static void nfsd4_open_deleg_none_ext (struct nfsd4_open * open , int status )
60696069{
6070- open -> op_delegate_type = NFS4_OPEN_DELEGATE_NONE_EXT ;
6070+ open -> op_delegate_type = OPEN_DELEGATE_NONE_EXT ;
60716071 if (status == - EAGAIN )
60726072 open -> op_why_no_deleg = WND4_CONTENTION ;
60736073 else {
@@ -6183,20 +6183,20 @@ nfs4_open_delegation(struct nfsd4_open *open, struct nfs4_ol_stateid *stp,
61836183 destroy_delegation (dp );
61846184 goto out_no_deleg ;
61856185 }
6186- open -> op_delegate_type = NFS4_OPEN_DELEGATE_WRITE ;
6186+ open -> op_delegate_type = OPEN_DELEGATE_WRITE ;
61876187 dp -> dl_cb_fattr .ncf_cur_fsize = stat .size ;
61886188 dp -> dl_cb_fattr .ncf_initial_cinfo = nfsd4_change_attribute (& stat );
61896189 trace_nfsd_deleg_write (& dp -> dl_stid .sc_stateid );
61906190 } else {
6191- open -> op_delegate_type = NFS4_OPEN_DELEGATE_READ ;
6191+ open -> op_delegate_type = OPEN_DELEGATE_READ ;
61926192 trace_nfsd_deleg_read (& dp -> dl_stid .sc_stateid );
61936193 }
61946194 nfs4_put_stid (& dp -> dl_stid );
61956195 return ;
61966196out_no_deleg :
6197- open -> op_delegate_type = NFS4_OPEN_DELEGATE_NONE ;
6197+ open -> op_delegate_type = OPEN_DELEGATE_NONE ;
61986198 if (open -> op_claim_type == NFS4_OPEN_CLAIM_PREVIOUS &&
6199- open -> op_delegate_type != NFS4_OPEN_DELEGATE_NONE ) {
6199+ open -> op_delegate_type != OPEN_DELEGATE_NONE ) {
62006200 dprintk ("NFSD: WARNING: refusing delegation reclaim\n" );
62016201 open -> op_recall = true;
62026202 }
@@ -6211,17 +6211,17 @@ static void nfsd4_deleg_xgrade_none_ext(struct nfsd4_open *open,
62116211 struct nfs4_delegation * dp )
62126212{
62136213 if (open -> op_deleg_want == NFS4_SHARE_WANT_READ_DELEG &&
6214- dp -> dl_type == NFS4_OPEN_DELEGATE_WRITE ) {
6215- open -> op_delegate_type = NFS4_OPEN_DELEGATE_NONE_EXT ;
6214+ dp -> dl_type == OPEN_DELEGATE_WRITE ) {
6215+ open -> op_delegate_type = OPEN_DELEGATE_NONE_EXT ;
62166216 open -> op_why_no_deleg = WND4_NOT_SUPP_DOWNGRADE ;
62176217 } else if (open -> op_deleg_want == NFS4_SHARE_WANT_WRITE_DELEG &&
6218- dp -> dl_type == NFS4_OPEN_DELEGATE_WRITE ) {
6219- open -> op_delegate_type = NFS4_OPEN_DELEGATE_NONE_EXT ;
6218+ dp -> dl_type == OPEN_DELEGATE_WRITE ) {
6219+ open -> op_delegate_type = OPEN_DELEGATE_NONE_EXT ;
62206220 open -> op_why_no_deleg = WND4_NOT_SUPP_UPGRADE ;
62216221 }
62226222 /* Otherwise the client must be confused wanting a delegation
62236223 * it already has, therefore we don't return
6224- * NFS4_OPEN_DELEGATE_NONE_EXT and reason.
6224+ * OPEN_DELEGATE_NONE_EXT and reason.
62256225 */
62266226}
62276227
@@ -6311,7 +6311,7 @@ nfsd4_process_open2(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nf
63116311
63126312 if (nfsd4_has_session (& resp -> cstate )) {
63136313 if (open -> op_deleg_want & NFS4_SHARE_WANT_NO_DELEG ) {
6314- open -> op_delegate_type = NFS4_OPEN_DELEGATE_NONE_EXT ;
6314+ open -> op_delegate_type = OPEN_DELEGATE_NONE_EXT ;
63156315 open -> op_why_no_deleg = WND4_NOT_WANTED ;
63166316 goto nodeleg ;
63176317 }
@@ -6327,7 +6327,7 @@ nfsd4_process_open2(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nf
63276327 trace_nfsd_open (& stp -> st_stid .sc_stateid );
63286328out :
63296329 /* 4.1 client trying to upgrade/downgrade delegation? */
6330- if (open -> op_delegate_type == NFS4_OPEN_DELEGATE_NONE && dp &&
6330+ if (open -> op_delegate_type == OPEN_DELEGATE_NONE && dp &&
63316331 open -> op_deleg_want )
63326332 nfsd4_deleg_xgrade_none_ext (open , dp );
63336333
0 commit comments