Skip to contentSkip to conversation

2.6.17.8 - do_vfs_lock: VFS is out of sync with lock manager!

DISCUSSION Chuck Ebbert 1 participant 1 message Aug 12, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

In-Reply-To: <[email protected]>

Quoted 4 lines · Jesper Juhl
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

I have some webservers that have recently started reporting the following message in their logs :

do_vfs_lock: VFS is out of sync with lock manager!

What does this (not even compile tested) patch print?

fs/lockd/clntproc.c.new renamed from fs/lockd/clntproc.c +5 -3
@@ -458,7 +458,9 @@ static void nlmclnt_locks_init_private(s
 static void do_vfs_lock(struct file_lock *fl)
 {
 	int res = 0;
-	switch (fl->fl_flags & (FL_POSIX|FL_FLOCK)) {
+	unsigned char flags = fl->fl_flags & (FL_POSIX|FL_FLOCK);
+
+	switch (flags) {
 		case FL_POSIX:
 			res = posix_lock_file_wait(fl->fl_file, fl);
 			break;
@@ -469,8 +471,8 @@ static void do_vfs_lock(struct file_lock
 			BUG();
 	}
 	if (res < 0)
-		printk(KERN_WARNING "%s: VFS is out of sync with lock manager!\n",
-				__FUNCTION__);
+		printk(KERN_WARNING "%s: VFS is out of sync with lock manager! -- %s: %d\n",
+				__FUNCTION__, flags == FL_POSIX ? "POSIX" : "FLOCK", res);
 }
 
 /*
Signature · 1 line
Chuck