Re: 2.0.31-1 patch: possible fix for some inode problems

Benjamin C.R. LaHaise (blah@kvack.org)
Sun, 9 Nov 1997 17:01:50 -0500 (EST)


On Sun, 9 Nov 1997, Nathan Bryant wrote:

> [snip]
>
> Tried your patch. I'm getting tons of "VFS: clear_inode called on unlocked
> inode." messages.

Are you using MD? If so you can safely ignore the message - I just wanted
to see if any of the filesystems were doing anything silly. The following
patch 'll take care of it and still let the message come through.
Alternatively, just comment out the printk in clear_inode (as it locks the
inode if it wasn't).

-ben

--- lin-ben/drivers/block/md.c.orig Sat Jun 29 17:04:00 1996
+++ lin-ben/drivers/block/md.c Sun Nov 9 16:57:37 1997
@@ -215,8 +215,10 @@
}

/* Remove locks. */
- for (i=0; i<md_dev[minor].nb_dev; i++)
+ for (i=0; i<md_dev[minor].nb_dev; i++) {
+ md_dev[minor].devices[i].inode->i_lock = 1;
clear_inode (md_dev[minor].devices[i].inode);
+ }

md_dev[minor].nb_dev=md_size[minor]=0;
md_hd_struct[minor].nr_sects=0;