From 4a3ae42dc312dbdffee803efaf393421b79f997a Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Mon, 2 Oct 2006 02:17:53 -0700 Subject: [PATCH] knfsd: Correctly handle error condition from lockd_up If lockd_up fails - what should we expect? Do we have to later call lockd_down? Well the nfs client thinks "no", the nfs server thinks "yes". lockd thinks "yes". The only answer that really makes sense is "no" !! So: Make lockd_up only increment nlmsvc_users on success. Make nfsd handle errors from lockd_up properly. Make sure lockd_up(0) never fails when lockd is running so that the 'reclaimer' call to lockd_up doesn't need to be error checked. Cc: "J. Bruce Fields" Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/lockd/clntlock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/lockd/clntlock.c') diff --git a/fs/lockd/clntlock.c b/fs/lockd/clntlock.c index 6abb465b650f..87e1d03e8267 100644 --- a/fs/lockd/clntlock.c +++ b/fs/lockd/clntlock.c @@ -202,7 +202,7 @@ reclaimer(void *ptr) /* This one ensures that our parent doesn't terminate while the * reclaim is in progress */ lock_kernel(); - lockd_up(0); + lockd_up(0); /* note: this cannot fail as lockd is already running */ nlmclnt_prepare_reclaim(host); /* First, reclaim all locks that have been marked. */ -- cgit v1.2.1