svclock.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) --- linux-2.6.8.1-grrr/fs/lockd/svclock.c.orig 2004-08-14 14:25:56.000000000 -0400 +++ linux-2.6.8.1-grrr/fs/lockd/svclock.c 2004-08-18 19:34:13.000000000 -0400 @@ -238,8 +238,13 @@ nlmsvc_delete_block(struct nlm_block *bl /* 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. */