This is not exciting as Jeff Garzik's new NFSv4 server but a painful
chore needs to be done. Will start to push the patches for NLM lock
failover code next week. However, instead of doing large amount of
patches all at once, would like to do it one by one, if they can be
functionally separated. This is to avoid the tedious re-base works I
have been doing for the past, (oh no), two years ??!!!
First one should be simple enough without too much explanation ....
-- Wendy
This fixes the incorrect fclose call inside nlm_traverse_files() where
a posix lock could still be held by NFS client. Problem was found in a
kernel panic inside locks_remove_flock() (fs/locks.c:2034) as part of
the fclose call due to NFS-NLM locks still hanging on inode->i_flock list.
Also see: http://people.redhat.com/wcheng/Patches/NFS/NLM/001.txt
svcsubs.c | 3 +--
1 files changed, 1 insertion(+), 2 deletions(-)
--- gfs2-nmw/fs/lockd/svcsubs.c 2007-04-10 11:59:09.000000000 -0400
+++ linux/fs/lockd/svcsubs.c 2007-04-18 10:01:23.000000000 -0400
@@ -250,8 +250,7 @@ nlm_traverse_files(struct nlm_host *host
mutex_lock(&nlm_file_mutex);
file->f_count--;
/* No more references to this file. Let go of it. */
- if (list_empty(&file->f_blocks) && !file->f_locks
- && !file->f_shares && !file->f_count) {
+ if (!nlm_file_inuse(file)) {
hlist_del(&file->f_list);
nlmsvc_ops->fclose(file->f_file);
kfree(file);