vserver 2.0 rc7
[linux-2.6.git] / fs / bad_inode.c
index 90ce87a..e172180 100644 (file)
 #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;
@@ -58,7 +47,7 @@ static struct file_operations bad_file_ops =
        .get_unmapped_area = EIO_ERROR,
 };
 
-struct inode_operations bad_inode_ops =
+static struct inode_operations bad_inode_ops =
 {
        .create         = EIO_ERROR,
        .lookup         = EIO_ERROR,
@@ -70,7 +59,8 @@ struct inode_operations bad_inode_ops =
        .mknod          = EIO_ERROR,
        .rename         = EIO_ERROR,
        .readlink       = EIO_ERROR,
-       .follow_link    = bad_follow_link,
+       /* follow_link must be no-op, otherwise unmounting this inode
+          won't work */
        .truncate       = EIO_ERROR,
        .permission     = EIO_ERROR,
        .getattr        = EIO_ERROR,