[PATCH 2.6.0-test4]bad_inode dcl fixes

From: ffrederick
Date: Tue Aug 26 2003 - 09:42:40 EST


Andrew,
Here's a patch against 2.6.0-test4 bad_inode structures

Summary:
-All operations assigned to EIO
-_current?_EIO question

Could you apply ?

Regards,
Fabian

--- orig/fs/bad_inode.c 2003-08-22 23:53:03.000000000 +0000
+++ edited/fs/bad_inode.c 2003-08-26 16:33:39.000000000 +0000
@@ -4,6 +4,8 @@
* Copyright (C) 1997, Stephen Tweedie
*
* Provide stub functions for unreadable inodes
+ *
+ * Fabian Frederick : August 2003 - All file operations assigned to EIO
*/

#include <linux/fs.h>
@@ -28,11 +30,18 @@

#define EIO_ERROR ((void *) (return_EIO))

+/*
+ * Returned file & inode operations attached to bad inode
+ * (Is it the _real_ current EIO ? (Fab))
+ */
+
static struct file_operations bad_file_ops =
{
.llseek = EIO_ERROR,
+ .aio_read = EIO_ERROR,
.read = EIO_ERROR,
.write = EIO_ERROR,
+ .aio_write = EIO_ERROR,
.readdir = EIO_ERROR,
.poll = EIO_ERROR,
.ioctl = EIO_ERROR,
@@ -41,8 +50,14 @@
.flush = EIO_ERROR,
.release = EIO_ERROR,
.fsync = EIO_ERROR,
+ .aio_fsync = EIO_ERROR,
.fasync = EIO_ERROR,
.lock = EIO_ERROR,
+ .readv = EIO_ERROR,
+ .writev = EIO_ERROR,
+ .sendfile = EIO_ERROR,
+ .sendpage = EIO_ERROR,
+ .get_unmapped_area = EIO_ERROR,
};

struct inode_operations bad_inode_ops =
@@ -61,6 +76,11 @@
.truncate = EIO_ERROR,
.permission = EIO_ERROR,
.getattr = EIO_ERROR,
+ .setattr = EIO_ERROR,
+ .setxattr = EIO_ERROR,
+ .getxattr = EIO_ERROR,
+ .listxattr = EIO_ERROR,
+ .removexattr = 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/