summaryrefslogtreecommitdiffstats
path: root/fs/lockd
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1999-10-09 00:00:47 +0000
committerRalf Baechle <ralf@linux-mips.org>1999-10-09 00:00:47 +0000
commitd6434e1042f3b0a6dfe1b1f615af369486f9b1fa (patch)
treee2be02f33984c48ec019c654051d27964e42c441 /fs/lockd
parent609d1e803baf519487233b765eb487f9ec227a18 (diff)
Merge with 2.3.19.
Diffstat (limited to 'fs/lockd')
-rw-r--r--fs/lockd/clntlock.c2
-rw-r--r--fs/lockd/svclock.c11
2 files changed, 8 insertions, 5 deletions
diff --git a/fs/lockd/clntlock.c b/fs/lockd/clntlock.c
index efda2a30d..7a4674d85 100644
--- a/fs/lockd/clntlock.c
+++ b/fs/lockd/clntlock.c
@@ -172,7 +172,7 @@ reclaimer(void *ptr)
/* First, reclaim all locks that have been granted previously. */
do {
- for (fl = file_lock_table; fl; fl = fl->fl_next) {
+ for (fl = file_lock_table; fl; fl = fl->fl_nextlink) {
inode = fl->fl_file->f_dentry->d_inode;
if (inode->i_sb->s_magic == NFS_SUPER_MAGIC
&& nlm_cmp_addr(NFS_ADDR(inode), &host->h_addr)
diff --git a/fs/lockd/svclock.c b/fs/lockd/svclock.c
index 10c66ed4d..73caf6349 100644
--- a/fs/lockd/svclock.c
+++ b/fs/lockd/svclock.c
@@ -335,9 +335,12 @@ again:
/* 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 @@ nlmsvc_notify_blocked(struct file_lock *fl)
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;