patch-2.2.19 linux/fs/lockd/svcshare.c

Next file: linux/fs/lockd/svcsubs.c
Previous file: linux/fs/lockd/svcproc.c
Back to the patch index
Back to the overall index

diff -u --new-file --recursive --exclude-from /usr/src/exclude v2.2.18/fs/lockd/svcshare.c linux/fs/lockd/svcshare.c
@@ -95,14 +95,16 @@
 
 	shpp = &file->f_shares;
 	while ((share = *shpp) !=  NULL) {
+		if (host && host != share->s_host) {
+			shpp = &share->s_next;
+			continue;
+		}
 		if (action == NLM_ACT_MARK)
 			share->s_host->h_inuse = 1;
 		else if (action == NLM_ACT_UNLOCK) {
-			if (host == NULL || host == share->s_host) {
-				*shpp = share->s_next;
-				kfree(share);
-				continue;
-			}
+			*shpp = share->s_next;
+			kfree(share);
+			continue;
 		}
 		shpp = &share->s_next;
 	}

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)