lkml.org 
[lkml]   [2003]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 2.6.0-test4]bad_inode dcl fixes
From
Date
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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:48    [W:0.046 / U:0.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site