Commit d6d6692e authored by Trond Myklebust's avatar Trond Myklebust

NLM: Fix a bug which causes a newly granted lock to be

   immediately unlocked on the server side if blocking
   has occurred.
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@fys.uio.no>
parent e869cf72
......@@ -238,8 +238,13 @@ nlmsvc_delete_block(struct nlm_block *block, int unlock)
/* Remove block from list */
nlmsvc_remove_block(block);
posix_unblock_lock(file->f_file, fl);
block->b_granted = 0;
if (fl->fl_next)
posix_unblock_lock(file->f_file, fl);
if (unlock) {
fl->fl_type = F_UNLCK;
posix_lock_file(file->f_file, fl);
block->b_granted = 0;
}
/* If the block is in the middle of a GRANT callback,
* don't kill it yet. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment