summaryrefslogtreecommitdiffstats
path: root/fs/ioctl.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-02-23 00:40:54 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-02-23 00:40:54 +0000
commit529c593ece216e4aaffd36bd940cb94f1fa63129 (patch)
tree78f1c0b805f5656aa7b0417a043c5346f700a2cf /fs/ioctl.c
parent0bd079751d25808d1972baee5c4eaa1db2227257 (diff)
Merge with 2.3.43. I did ignore all modifications to the qlogicisp.c
driver due to the Origin A64 hacks.
Diffstat (limited to 'fs/ioctl.c')
-rw-r--r--fs/ioctl.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/fs/ioctl.c b/fs/ioctl.c
index e7e226056..a02bbec67 100644
--- a/fs/ioctl.c
+++ b/fs/ioctl.c
@@ -19,21 +19,18 @@ static int file_ioctl(struct file *filp,unsigned int cmd,unsigned long arg)
switch (cmd) {
case FIBMAP:
{
- struct buffer_head tmp;
-
- if (inode->i_op == NULL)
- return -EBADF;
- if (inode->i_op->get_block == NULL)
+ struct address_space *mapping = inode->i_mapping;
+ int res;
+ /* do we support this mess? */
+ if (!mapping->a_ops->bmap)
return -EINVAL;
if (!capable(CAP_SYS_RAWIO))
return -EPERM;
if ((error = get_user(block, (int *) arg)) != 0)
return error;
- tmp.b_state = 0;
- tmp.b_blocknr = 0;
- inode->i_op->get_block(inode, block, &tmp, 0);
- return put_user(tmp.b_blocknr, (int *) arg);
+ res = mapping->a_ops->bmap(mapping, block);
+ return put_user(res, (int *) arg);
}
case FIGETBSZ:
if (inode->i_sb == NULL)