summaryrefslogtreecommitdiffstats
path: root/drivers/i2o
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-01-21 22:34:01 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-01-21 22:34:01 +0000
commit9e30c3705aed9fbec4c3304570e4d6e707856bcb (patch)
treeb19e6acb5a67af31a4e7742e05c2166dc3f1444c /drivers/i2o
parent72919904796333a20c6a5d5c380091b42e407aa9 (diff)
Merge with Linux 2.3.22.
Diffstat (limited to 'drivers/i2o')
-rw-r--r--drivers/i2o/i2o_block.c28
1 files changed, 9 insertions, 19 deletions
diff --git a/drivers/i2o/i2o_block.c b/drivers/i2o/i2o_block.c
index 4bcb7dd8a..5042f4e97 100644
--- a/drivers/i2o/i2o_block.c
+++ b/drivers/i2o/i2o_block.c
@@ -643,27 +643,9 @@ static int i2ob_ioctl(struct inode *inode, struct file *file,
dev = &i2ob_dev[minor];
switch (cmd) {
- case BLKRASET:
- if(!capable(CAP_SYS_ADMIN)) return -EACCES;
- if(arg > 0xff) return -EINVAL;
- read_ahead[MAJOR(inode->i_rdev)] = arg;
- return 0;
-
- case BLKRAGET:
- if (!arg) return -EINVAL;
- return put_user(read_ahead[MAJOR(inode->i_rdev)],
- (long *) arg);
case BLKGETSIZE:
return put_user(i2ob[minor].nr_sects, (long *) arg);
- case BLKFLSBUF:
- if(!capable(CAP_SYS_ADMIN))
- return -EACCES;
-
- fsync_dev(inode->i_rdev);
- invalidate_buffers(inode->i_rdev);
- return 0;
-
case HDIO_GETGEO:
{
struct hd_geometry g;
@@ -679,8 +661,16 @@ static int i2ob_ioctl(struct inode *inode, struct file *file,
return -EACCES;
return do_i2ob_revalidate(inode->i_rdev,1);
- default:
+ case BLKFLSBUF:
+ case BLKROSET:
+ case BLKROGET:
+ case BLKRASET:
+ case BLKRAGET:
+ case BLKPG:
return blk_ioctl(inode->i_rdev, cmd, arg);
+
+ default:
+ return -EINVAL;
}
}