@@ -2965,7 +2965,7 @@ static int nfs4_show_deleg(struct seq_file *s, struct nfs4_stid *st)
2965
2965
seq_puts (s , ": { type: deleg, " );
2966
2966
2967
2967
seq_printf (s , "access: %s" ,
2968
- ds -> dl_type == NFS4_OPEN_DELEGATE_READ ? "r" : "w" );
2968
+ ds -> dl_type == OPEN_DELEGATE_READ ? "r" : "w" );
2969
2969
2970
2970
/* XXX: lease time, whether it's being recalled. */
2971
2971
@@ -5581,7 +5581,7 @@ nfsd4_process_open1(struct nfsd4_compound_state *cstate,
5581
5581
static inline __be32
5582
5582
nfs4_check_delegmode (struct nfs4_delegation * dp , int flags )
5583
5583
{
5584
- if ((flags & WR_STATE ) && (dp -> dl_type == NFS4_OPEN_DELEGATE_READ ))
5584
+ if ((flags & WR_STATE ) && (dp -> dl_type == OPEN_DELEGATE_READ ))
5585
5585
return nfserr_openmode ;
5586
5586
else
5587
5587
return nfs_ok ;
@@ -5823,7 +5823,7 @@ static struct file_lease *nfs4_alloc_init_lease(struct nfs4_delegation *dp,
5823
5823
return NULL ;
5824
5824
fl -> fl_lmops = & nfsd_lease_mng_ops ;
5825
5825
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 ;
5827
5827
fl -> c .flc_owner = (fl_owner_t )dp ;
5828
5828
fl -> c .flc_pid = current -> tgid ;
5829
5829
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,
5969
5969
*/
5970
5970
if ((open -> op_share_access & NFS4_SHARE_ACCESS_BOTH ) == NFS4_SHARE_ACCESS_BOTH ) {
5971
5971
nf = find_rw_file (fp );
5972
- dl_type = NFS4_OPEN_DELEGATE_WRITE ;
5972
+ dl_type = OPEN_DELEGATE_WRITE ;
5973
5973
}
5974
5974
5975
5975
/*
@@ -5978,7 +5978,7 @@ nfs4_set_delegation(struct nfsd4_open *open, struct nfs4_ol_stateid *stp,
5978
5978
*/
5979
5979
if (!nf && (open -> op_share_access & NFS4_SHARE_ACCESS_READ )) {
5980
5980
nf = find_readable_file (fp );
5981
- dl_type = NFS4_OPEN_DELEGATE_READ ;
5981
+ dl_type = OPEN_DELEGATE_READ ;
5982
5982
}
5983
5983
5984
5984
if (!nf )
@@ -6067,7 +6067,7 @@ nfs4_set_delegation(struct nfsd4_open *open, struct nfs4_ol_stateid *stp,
6067
6067
6068
6068
static void nfsd4_open_deleg_none_ext (struct nfsd4_open * open , int status )
6069
6069
{
6070
- open -> op_delegate_type = NFS4_OPEN_DELEGATE_NONE_EXT ;
6070
+ open -> op_delegate_type = OPEN_DELEGATE_NONE_EXT ;
6071
6071
if (status == - EAGAIN )
6072
6072
open -> op_why_no_deleg = WND4_CONTENTION ;
6073
6073
else {
@@ -6183,20 +6183,20 @@ nfs4_open_delegation(struct nfsd4_open *open, struct nfs4_ol_stateid *stp,
6183
6183
destroy_delegation (dp );
6184
6184
goto out_no_deleg ;
6185
6185
}
6186
- open -> op_delegate_type = NFS4_OPEN_DELEGATE_WRITE ;
6186
+ open -> op_delegate_type = OPEN_DELEGATE_WRITE ;
6187
6187
dp -> dl_cb_fattr .ncf_cur_fsize = stat .size ;
6188
6188
dp -> dl_cb_fattr .ncf_initial_cinfo = nfsd4_change_attribute (& stat );
6189
6189
trace_nfsd_deleg_write (& dp -> dl_stid .sc_stateid );
6190
6190
} else {
6191
- open -> op_delegate_type = NFS4_OPEN_DELEGATE_READ ;
6191
+ open -> op_delegate_type = OPEN_DELEGATE_READ ;
6192
6192
trace_nfsd_deleg_read (& dp -> dl_stid .sc_stateid );
6193
6193
}
6194
6194
nfs4_put_stid (& dp -> dl_stid );
6195
6195
return ;
6196
6196
out_no_deleg :
6197
- open -> op_delegate_type = NFS4_OPEN_DELEGATE_NONE ;
6197
+ open -> op_delegate_type = OPEN_DELEGATE_NONE ;
6198
6198
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 ) {
6200
6200
dprintk ("NFSD: WARNING: refusing delegation reclaim\n" );
6201
6201
open -> op_recall = true;
6202
6202
}
@@ -6211,17 +6211,17 @@ static void nfsd4_deleg_xgrade_none_ext(struct nfsd4_open *open,
6211
6211
struct nfs4_delegation * dp )
6212
6212
{
6213
6213
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 ;
6216
6216
open -> op_why_no_deleg = WND4_NOT_SUPP_DOWNGRADE ;
6217
6217
} 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 ;
6220
6220
open -> op_why_no_deleg = WND4_NOT_SUPP_UPGRADE ;
6221
6221
}
6222
6222
/* Otherwise the client must be confused wanting a delegation
6223
6223
* it already has, therefore we don't return
6224
- * NFS4_OPEN_DELEGATE_NONE_EXT and reason.
6224
+ * OPEN_DELEGATE_NONE_EXT and reason.
6225
6225
*/
6226
6226
}
6227
6227
@@ -6311,7 +6311,7 @@ nfsd4_process_open2(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nf
6311
6311
6312
6312
if (nfsd4_has_session (& resp -> cstate )) {
6313
6313
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 ;
6315
6315
open -> op_why_no_deleg = WND4_NOT_WANTED ;
6316
6316
goto nodeleg ;
6317
6317
}
@@ -6327,7 +6327,7 @@ nfsd4_process_open2(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nf
6327
6327
trace_nfsd_open (& stp -> st_stid .sc_stateid );
6328
6328
out :
6329
6329
/* 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 &&
6331
6331
open -> op_deleg_want )
6332
6332
nfsd4_deleg_xgrade_none_ext (open , dp );
6333
6333
0 commit comments