patch-2.1.58 linux/fs/bad_inode.c

Next file: linux/fs/binfmt_misc.c
Previous file: linux/arch/i386/mm/fault.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.57/linux/fs/bad_inode.c linux/fs/bad_inode.c
@@ -19,7 +19,7 @@
 	return ERR_PTR(-EIO);
 }
 
-static int return_EIO()
+static int return_EIO(void)
 {
 	return -EIO;
 }
@@ -81,3 +81,12 @@
 	inode->i_op = &bad_inode_ops;	
 }
 
+/*
+ * This tests whether an inode has been flagged as bad. The test uses
+ * &bad_inode_ops to cover the case of invalidated inodes as well as
+ * those created by make_bad_inode() above.
+ */
+int is_bad_inode(struct inode * inode) 
+{
+	return (inode->i_op == &bad_inode_ops);	
+}

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov