All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix NLM reference count panic
@ 2008-01-04 22:48 Wendy Cheng
  2008-01-04 22:58 ` Wendy Cheng
  2008-01-04 23:24 ` J. Bruce Fields
  0 siblings, 2 replies; 7+ messages in thread
From: Wendy Cheng @ 2008-01-04 22:48 UTC (permalink / raw)
  To: NFS list

[-- Attachment #1: Type: text/plain, Size: 483 bytes --]

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




[-- Attachment #2: 001-nlm_f_count.patch --]
[-- Type: text/x-patch, Size: 955 bytes --]

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);

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-01-05 17:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-04 22:48 [PATCH] Fix NLM reference count panic Wendy Cheng
2008-01-04 22:58 ` Wendy Cheng
2008-01-04 23:24 ` J. Bruce Fields
2008-01-05  5:03   ` Wendy Cheng
2008-01-05  6:05     ` J. Bruce Fields
2008-01-05 17:46       ` Wendy Cheng
2008-01-05 17:36         ` J. Bruce Fields

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.