patch-2.2.11 linux/fs/lockd/svclock.c
Next file: linux/fs/locks.c
Previous file: linux/fs/lockd/clntlock.c
Back to the patch index
Back to the overall index
- Lines: 25
- Date:
Mon Aug 9 12:05:02 1999
- Orig file:
v2.2.10/linux/fs/lockd/svclock.c
- Orig date:
Wed Feb 17 09:44:33 1999
diff -u --recursive --new-file v2.2.10/linux/fs/lockd/svclock.c linux/fs/lockd/svclock.c
@@ -335,9 +335,12 @@
/* Append to list of blocked */
nlmsvc_insert_block(block, NLM_NEVER);
- /* Now add block to block list of the conflicting lock */
- dprintk("lockd: blocking on this lock.\n");
- posix_block_lock(conflock, &block->b_call.a_args.lock.fl);
+ if (!block->b_call.a_args.lock.fl.fl_prevblock) {
+ /* Now add block to block list of the conflicting lock
+ if we haven't done so. */
+ dprintk("lockd: blocking on this lock.\n");
+ posix_block_lock(conflock, &block->b_call.a_args.lock.fl);
+ }
up(&file->f_sema);
return nlm_lck_blocked;
@@ -440,7 +443,7 @@
dprintk("lockd: VFS unblock notification for block %p\n", fl);
posix_unblock_lock(fl);
for (bp = &nlm_blocked; (block = *bp); bp = &block->b_next) {
- if (&block->b_call.a_args.lock.fl == fl) {
+ if (nlm_compare_locks(&block->b_call.a_args.lock.fl, fl)) {
svc_wake_up(block->b_daemon);
nlmsvc_insert_block(block, 0);
return;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)