Can't unmount bad inode
From: Miklos Szeredi
Date: Sat Jan 15 2005 - 14:24:03 EST
When the root of a mount is a bad inode, it can't be unmounted.
Comment above bad_follow_link is also out of sync with code. What
about just removing the follow_link method from bad_inode_ops
(untested patch attached)?
Same problem exists on 2.4.
Miklos
--- linux-2.6.10/fs/bad_inode.c.orig 2005-01-15 20:01:21.000000000 +0100
+++ linux-2.6.10/fs/bad_inode.c 2005-01-15 20:02:01.000000000 +0100
@@ -15,17 +15,6 @@
#include <linux/smp_lock.h>
#include <linux/namei.h>
-/*
- * The follow_link operation is special: it must behave as a no-op
- * so that a bad root inode can at least be unmounted. To do this
- * we must dput() the base and return the dentry with a dget().
- */
-static int bad_follow_link(struct dentry *dent, struct nameidata *nd)
-{
- nd_set_link(nd, ERR_PTR(-EIO));
- return 0;
-}
-
static int return_EIO(void)
{
return -EIO;
@@ -70,7 +59,6 @@ struct inode_operations bad_inode_ops =
.mknod = EIO_ERROR,
.rename = EIO_ERROR,
.readlink = EIO_ERROR,
- .follow_link = bad_follow_link,
.truncate = EIO_ERROR,
.permission = EIO_ERROR,
.getattr = EIO_ERROR,
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/