Re: PATCH - Don't remove inode from hash until filesystem has deleted it.

Jan Harkes (jaharkes@cs.cmu.edu)
Thu, 8 May 2003 16:43:34 -0400


On Thu, May 08, 2003 at 11:44:32AM +1000, Neil Brown wrote:
> ------------------------------------------------------
> Don't remove inode from hash until filesystem has deleted it.
>
> With this patch, the inode being deleted is left on the hash table,
> and if a lookup find an inode being freed in the hashtable, it waits
> in the inode waitqueue for the inode to be fully deleted.

I could be wrong, but won't that break the following sequence of
operations,

mkdir("foo", 0755);
fd = creat("foo/bar", 0644);
unlink("foo/bar");
rmdir("foo"); /* this should succeed, but if the file is hashed
we get EBUSY here */
close(fd);

Or have potential deadlock effects when rmdir is replaced with some
operation that tries to perform a lookup for the inode, f.i. a
stat("foo/bar", &statbuf);

Jan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/