aboutsummaryrefslogtreecommitdiffstats
path: root/fs/lockd/clntproc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/lockd/clntproc.c')
-rw-r--r--fs/lockd/clntproc.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/fs/lockd/clntproc.c b/fs/lockd/clntproc.c
index 80ae3127699f..cb469431bd1d 100644
--- a/fs/lockd/clntproc.c
+++ b/fs/lockd/clntproc.c
@@ -465,7 +465,6 @@ static void nlmclnt_locks_init_private(struct file_lock *fl, struct nlm_host *ho
465{ 465{
466 BUG_ON(fl->fl_ops != NULL); 466 BUG_ON(fl->fl_ops != NULL);
467 fl->fl_u.nfs_fl.state = 0; 467 fl->fl_u.nfs_fl.state = 0;
468 fl->fl_u.nfs_fl.flags = 0;
469 fl->fl_u.nfs_fl.owner = nlm_find_lockowner(host, fl->fl_owner); 468 fl->fl_u.nfs_fl.owner = nlm_find_lockowner(host, fl->fl_owner);
470 fl->fl_ops = &nlmclnt_lock_ops; 469 fl->fl_ops = &nlmclnt_lock_ops;
471} 470}
@@ -552,8 +551,8 @@ nlmclnt_lock(struct nlm_rqst *req, struct file_lock *fl)
552 551
553 if (resp->status == NLM_LCK_GRANTED) { 552 if (resp->status == NLM_LCK_GRANTED) {
554 fl->fl_u.nfs_fl.state = host->h_state; 553 fl->fl_u.nfs_fl.state = host->h_state;
555 fl->fl_u.nfs_fl.flags |= NFS_LCK_GRANTED;
556 fl->fl_flags |= FL_SLEEP; 554 fl->fl_flags |= FL_SLEEP;
555 list_add_tail(&fl->fl_u.nfs_fl.list, &host->h_granted);
557 do_vfs_lock(fl); 556 do_vfs_lock(fl);
558 } 557 }
559 status = nlm_stat_to_errno(resp->status); 558 status = nlm_stat_to_errno(resp->status);
@@ -619,9 +618,11 @@ nlmclnt_unlock(struct nlm_rqst *req, struct file_lock *fl)
619 struct nlm_res *resp = &req->a_res; 618 struct nlm_res *resp = &req->a_res;
620 int status; 619 int status;
621 620
622 /* Clean the GRANTED flag now so the lock doesn't get 621 /*
623 * reclaimed while we're stuck in the unlock call. */ 622 * Remove from the granted list now so the lock doesn't get
624 fl->fl_u.nfs_fl.flags &= ~NFS_LCK_GRANTED; 623 * reclaimed while we're stuck in the unlock call.
624 */
625 list_del(&fl->fl_u.nfs_fl.list);
625 626
626 /* 627 /*
627 * Note: the server is supposed to either grant us the unlock 628 * Note: the server is supposed to either grant us the unlock