summaryrefslogtreecommitdiffstats
path: root/fs/lockd/clntlock.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2006-03-20 13:44:41 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-03-20 13:44:41 -0500
commit4c060b531006e0711db32a132d6ac7661594b280 (patch)
tree899f281dfec3da7e29ede2e76019b3861116714f /fs/lockd/clntlock.c
parent26bcbf965f857c710adafd16cf424f043006b5dd (diff)
lockd: Fix Oopses due to list manipulation errors.
The patch "stop abusing file_lock_list introduces a couple of bugs since the locks may be copied and need to be removed from the lists when they are destroyed. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/lockd/clntlock.c')
-rw-r--r--fs/lockd/clntlock.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/lockd/clntlock.c b/fs/lockd/clntlock.c
index 0fc0ee267b0..7cf41c1e1a8 100644
--- a/fs/lockd/clntlock.c
+++ b/fs/lockd/clntlock.c
@@ -213,11 +213,12 @@ reclaimer(void *ptr)
/* First, reclaim all locks that have been marked. */
restart:
list_for_each_entry_safe(fl, next, &host->h_reclaim, fl_u.nfs_fl.list) {
- list_del(&fl->fl_u.nfs_fl.list);
+ list_del_init(&fl->fl_u.nfs_fl.list);
- nlmclnt_reclaim(host, fl);
if (signalled())
- break;
+ continue;
+ if (nlmclnt_reclaim(host, fl) == 0)
+ list_add_tail(&fl->fl_u.nfs_fl.list, &host->h_granted);
goto restart;
}