[PATCH] knfsd: lockd: make nlm_traverse_* more flexible
authorOlaf Kirch <okir@suse.de>
Wed, 4 Oct 2006 09:15:59 +0000 (02:15 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 4 Oct 2006 14:55:17 +0000 (07:55 -0700)
commitf2af793db02d2c2f677bdb5bf8e0efdcbf9c0256
tree2daa40a1a128905ff514df995903d8ef8d692b04
parent07ba80635117c136714084e019375aa508365375
[PATCH] knfsd: lockd: make nlm_traverse_* more flexible

This patch makes nlm_traverse{locks,blocks,shares} and friends use a function
pointer rather than a "action" enum.

This function pointer is given two nlm_hosts (one given by the caller, the
other taken from the lock/block/share currently visited), and is free to do
with them as it wants.  If it returns a non-zero value, the lockd/block/share
is released.

Signed-off-by: Olaf Kirch <okir@suse.de>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/lockd/svclock.c
fs/lockd/svcshare.c
fs/lockd/svcsubs.c
include/linux/lockd/lockd.h
include/linux/lockd/share.h