@@ -6800,7 +6800,7 @@ static int _nfs4_proc_getlk(struct nfs4_state *state, int cmd, struct file_lock
68006800 status = nfs4_call_sync (server -> client , server , & msg , & arg .seq_args , & res .seq_res , 1 );
68016801 switch (status ) {
68026802 case 0 :
6803- request -> fl_type = F_UNLCK ;
6803+ request -> c . flc_type = F_UNLCK ;
68046804 break ;
68056805 case - NFS4ERR_DENIED :
68066806 status = 0 ;
@@ -7018,8 +7018,8 @@ static struct rpc_task *nfs4_do_unlck(struct file_lock *fl,
70187018 /* Ensure this is an unlock - when canceling a lock, the
70197019 * canceled lock is passed in, and it won't be an unlock.
70207020 */
7021- fl -> fl_type = F_UNLCK ;
7022- if (fl -> fl_flags & FL_CLOSE )
7021+ fl -> c . flc_type = F_UNLCK ;
7022+ if (fl -> c . flc_flags & FL_CLOSE )
70237023 set_bit (NFS_CONTEXT_UNLOCK , & ctx -> flags );
70247024
70257025 data = nfs4_alloc_unlockdata (fl , ctx , lsp , seqid );
@@ -7045,11 +7045,11 @@ static int nfs4_proc_unlck(struct nfs4_state *state, int cmd, struct file_lock *
70457045 struct rpc_task * task ;
70467046 struct nfs_seqid * (* alloc_seqid )(struct nfs_seqid_counter * , gfp_t );
70477047 int status = 0 ;
7048- unsigned char saved_flags = request -> fl_flags ;
7048+ unsigned char saved_flags = request -> c . flc_flags ;
70497049
70507050 status = nfs4_set_lock_state (state , request );
70517051 /* Unlock _before_ we do the RPC call */
7052- request -> fl_flags |= FL_EXISTS ;
7052+ request -> c . flc_flags |= FL_EXISTS ;
70537053 /* Exclude nfs_delegation_claim_locks() */
70547054 mutex_lock (& sp -> so_delegreturn_mutex );
70557055 /* Exclude nfs4_reclaim_open_stateid() - note nesting! */
@@ -7073,14 +7073,16 @@ static int nfs4_proc_unlck(struct nfs4_state *state, int cmd, struct file_lock *
70737073 status = - ENOMEM ;
70747074 if (IS_ERR (seqid ))
70757075 goto out ;
7076- task = nfs4_do_unlck (request , nfs_file_open_context (request -> fl_file ), lsp , seqid );
7076+ task = nfs4_do_unlck (request ,
7077+ nfs_file_open_context (request -> c .flc_file ),
7078+ lsp , seqid );
70777079 status = PTR_ERR (task );
70787080 if (IS_ERR (task ))
70797081 goto out ;
70807082 status = rpc_wait_for_completion_task (task );
70817083 rpc_put_task (task );
70827084out :
7083- request -> fl_flags = saved_flags ;
7085+ request -> c . flc_flags = saved_flags ;
70847086 trace_nfs4_unlock (request , state , F_SETLK , status );
70857087 return status ;
70867088}
@@ -7191,7 +7193,7 @@ static void nfs4_lock_done(struct rpc_task *task, void *calldata)
71917193 renew_lease (NFS_SERVER (d_inode (data -> ctx -> dentry )),
71927194 data -> timestamp );
71937195 if (data -> arg .new_lock && !data -> cancelled ) {
7194- data -> fl .fl_flags &= ~(FL_SLEEP | FL_ACCESS );
7196+ data -> fl .c . flc_flags &= ~(FL_SLEEP | FL_ACCESS );
71957197 if (locks_lock_inode_wait (lsp -> ls_state -> inode , & data -> fl ) < 0 )
71967198 goto out_restart ;
71977199 }
@@ -7292,7 +7294,8 @@ static int _nfs4_do_setlk(struct nfs4_state *state, int cmd, struct file_lock *f
72927294 if (nfs_server_capable (state -> inode , NFS_CAP_MOVEABLE ))
72937295 task_setup_data .flags |= RPC_TASK_MOVEABLE ;
72947296
7295- data = nfs4_alloc_lockdata (fl , nfs_file_open_context (fl -> fl_file ),
7297+ data = nfs4_alloc_lockdata (fl ,
7298+ nfs_file_open_context (fl -> c .flc_file ),
72967299 fl -> fl_u .nfs4_fl .owner , GFP_KERNEL );
72977300 if (data == NULL )
72987301 return - ENOMEM ;
@@ -7398,10 +7401,10 @@ static int _nfs4_proc_setlk(struct nfs4_state *state, int cmd, struct file_lock
73987401{
73997402 struct nfs_inode * nfsi = NFS_I (state -> inode );
74007403 struct nfs4_state_owner * sp = state -> owner ;
7401- unsigned char flags = request -> fl_flags ;
7404+ unsigned char flags = request -> c . flc_flags ;
74027405 int status ;
74037406
7404- request -> fl_flags |= FL_ACCESS ;
7407+ request -> c . flc_flags |= FL_ACCESS ;
74057408 status = locks_lock_inode_wait (state -> inode , request );
74067409 if (status < 0 )
74077410 goto out ;
@@ -7410,7 +7413,7 @@ static int _nfs4_proc_setlk(struct nfs4_state *state, int cmd, struct file_lock
74107413 if (test_bit (NFS_DELEGATED_STATE , & state -> flags )) {
74117414 /* Yes: cache locks! */
74127415 /* ...but avoid races with delegation recall... */
7413- request -> fl_flags = flags & ~FL_SLEEP ;
7416+ request -> c . flc_flags = flags & ~FL_SLEEP ;
74147417 status = locks_lock_inode_wait (state -> inode , request );
74157418 up_read (& nfsi -> rwsem );
74167419 mutex_unlock (& sp -> so_delegreturn_mutex );
@@ -7420,7 +7423,7 @@ static int _nfs4_proc_setlk(struct nfs4_state *state, int cmd, struct file_lock
74207423 mutex_unlock (& sp -> so_delegreturn_mutex );
74217424 status = _nfs4_do_setlk (state , cmd , request , NFS_LOCK_NEW );
74227425out :
7423- request -> fl_flags = flags ;
7426+ request -> c . flc_flags = flags ;
74247427 return status ;
74257428}
74267429
@@ -7571,15 +7574,15 @@ nfs4_proc_lock(struct file *filp, int cmd, struct file_lock *request)
75717574 if (state == NULL )
75727575 return - ENOLCK ;
75737576
7574- if ((request -> fl_flags & FL_POSIX ) &&
7577+ if ((request -> c . flc_flags & FL_POSIX ) &&
75757578 !test_bit (NFS_STATE_POSIX_LOCKS , & state -> flags ))
75767579 return - ENOLCK ;
75777580
75787581 /*
75797582 * Don't rely on the VFS having checked the file open mode,
75807583 * since it won't do this for flock() locks.
75817584 */
7582- switch (request -> fl_type ) {
7585+ switch (request -> c . flc_type ) {
75837586 case F_RDLCK :
75847587 if (!(filp -> f_mode & FMODE_READ ))
75857588 return - EBADF ;
0 commit comments