immediately unlocked on the server side if blocking
has occurred.
Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
/* 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. */