diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/bio.c | 50 | ||||
-rw-r--r-- | fs/block_dev.c | 2 | ||||
-rw-r--r-- | fs/buffer.c | 6 | ||||
-rw-r--r-- | fs/compat_ioctl.c | 671 | ||||
-rw-r--r-- | fs/direct-io.c | 13 | ||||
-rw-r--r-- | fs/fs-writeback.c | 1 | ||||
-rw-r--r-- | fs/gfs2/super.c | 4 | ||||
-rw-r--r-- | fs/jfs/jfs_logmgr.c | 5 | ||||
-rw-r--r-- | fs/jfs/jfs_metapage.c | 12 | ||||
-rw-r--r-- | fs/mpage.c | 12 | ||||
-rw-r--r-- | fs/ocfs2/cluster/heartbeat.c | 4 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_aops.c | 4 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_buf.c | 4 |
13 files changed, 26 insertions, 762 deletions
@@ -798,13 +798,9 @@ void bio_unmap_user(struct bio *bio) | |||
798 | bio_put(bio); | 798 | bio_put(bio); |
799 | } | 799 | } |
800 | 800 | ||
801 | static int bio_map_kern_endio(struct bio *bio, unsigned int bytes_done, int err) | 801 | static void bio_map_kern_endio(struct bio *bio, int err) |
802 | { | 802 | { |
803 | if (bio->bi_size) | ||
804 | return 1; | ||
805 | |||
806 | bio_put(bio); | 803 | bio_put(bio); |
807 | return 0; | ||
808 | } | 804 | } |
809 | 805 | ||
810 | 806 | ||
@@ -1002,34 +998,26 @@ void bio_check_pages_dirty(struct bio *bio) | |||
1002 | /** | 998 | /** |
1003 | * bio_endio - end I/O on a bio | 999 | * bio_endio - end I/O on a bio |
1004 | * @bio: bio | 1000 | * @bio: bio |
1005 | * @bytes_done: number of bytes completed | ||
1006 | * @error: error, if any | 1001 | * @error: error, if any |
1007 | * | 1002 | * |
1008 | * Description: | 1003 | * Description: |
1009 | * bio_endio() will end I/O on @bytes_done number of bytes. This may be | 1004 | * bio_endio() will end I/O on the whole bio. bio_endio() is the |
1010 | * just a partial part of the bio, or it may be the whole bio. bio_endio() | 1005 | * preferred way to end I/O on a bio, it takes care of clearing |
1011 | * is the preferred way to end I/O on a bio, it takes care of decrementing | 1006 | * BIO_UPTODATE on error. @error is 0 on success, and and one of the |
1012 | * bi_size and clearing BIO_UPTODATE on error. @error is 0 on success, and | 1007 | * established -Exxxx (-EIO, for instance) error values in case |
1013 | * and one of the established -Exxxx (-EIO, for instance) error values in | 1008 | * something went wrong. Noone should call bi_end_io() directly on a |
1014 | * case something went wrong. Noone should call bi_end_io() directly on | 1009 | * bio unless they own it and thus know that it has an end_io |
1015 | * a bio unless they own it and thus know that it has an end_io function. | 1010 | * function. |
1016 | **/ | 1011 | **/ |
1017 | void bio_endio(struct bio *bio, unsigned int bytes_done, int error) | 1012 | void bio_endio(struct bio *bio, int error) |
1018 | { | 1013 | { |
1019 | if (error) | 1014 | if (error) |
1020 | clear_bit(BIO_UPTODATE, &bio->bi_flags); | 1015 | clear_bit(BIO_UPTODATE, &bio->bi_flags); |
1021 | 1016 | else if (!test_bit(BIO_UPTODATE, &bio->bi_flags)) | |
1022 | if (unlikely(bytes_done > bio->bi_size)) { | 1017 | error = -EIO; |
1023 | printk("%s: want %u bytes done, only %u left\n", __FUNCTION__, | ||
1024 | bytes_done, bio->bi_size); | ||
1025 | bytes_done = bio->bi_size; | ||
1026 | } | ||
1027 | |||
1028 | bio->bi_size -= bytes_done; | ||
1029 | bio->bi_sector += (bytes_done >> 9); | ||
1030 | 1018 | ||
1031 | if (bio->bi_end_io) | 1019 | if (bio->bi_end_io) |
1032 | bio->bi_end_io(bio, bytes_done, error); | 1020 | bio->bi_end_io(bio, error); |
1033 | } | 1021 | } |
1034 | 1022 | ||
1035 | void bio_pair_release(struct bio_pair *bp) | 1023 | void bio_pair_release(struct bio_pair *bp) |
@@ -1037,37 +1025,29 @@ void bio_pair_release(struct bio_pair *bp) | |||
1037 | if (atomic_dec_and_test(&bp->cnt)) { | 1025 | if (atomic_dec_and_test(&bp->cnt)) { |
1038 | struct bio *master = bp->bio1.bi_private; | 1026 | struct bio *master = bp->bio1.bi_private; |
1039 | 1027 | ||
1040 | bio_endio(master, master->bi_size, bp->error); | 1028 | bio_endio(master, bp->error); |
1041 | mempool_free(bp, bp->bio2.bi_private); | 1029 | mempool_free(bp, bp->bio2.bi_private); |
1042 | } | 1030 | } |
1043 | } | 1031 | } |
1044 | 1032 | ||
1045 | static int bio_pair_end_1(struct bio * bi, unsigned int done, int err) | 1033 | static void bio_pair_end_1(struct bio *bi, int err) |
1046 | { | 1034 | { |
1047 | struct bio_pair *bp = container_of(bi, struct bio_pair, bio1); | 1035 | struct bio_pair *bp = container_of(bi, struct bio_pair, bio1); |
1048 | 1036 | ||
1049 | if (err) | 1037 | if (err) |
1050 | bp->error = err; | 1038 | bp->error = err; |
1051 | 1039 | ||
1052 | if (bi->bi_size) | ||
1053 | return 1; | ||
1054 | |||
1055 | bio_pair_release(bp); | 1040 | bio_pair_release(bp); |
1056 | return 0; | ||
1057 | } | 1041 | } |
1058 | 1042 | ||
1059 | static int bio_pair_end_2(struct bio * bi, unsigned int done, int err) | 1043 | static void bio_pair_end_2(struct bio *bi, int err) |
1060 | { | 1044 | { |
1061 | struct bio_pair *bp = container_of(bi, struct bio_pair, bio2); | 1045 | struct bio_pair *bp = container_of(bi, struct bio_pair, bio2); |
1062 | 1046 | ||
1063 | if (err) | 1047 | if (err) |
1064 | bp->error = err; | 1048 | bp->error = err; |
1065 | 1049 | ||
1066 | if (bi->bi_size) | ||
1067 | return 1; | ||
1068 | |||
1069 | bio_pair_release(bp); | 1050 | bio_pair_release(bp); |
1070 | return 0; | ||
1071 | } | 1051 | } |
1072 | 1052 | ||
1073 | /* | 1053 | /* |
diff --git a/fs/block_dev.c b/fs/block_dev.c index 2980eabe5779..6339a30879b7 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c | |||
@@ -172,7 +172,7 @@ blkdev_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov, | |||
172 | } | 172 | } |
173 | 173 | ||
174 | #if 0 | 174 | #if 0 |
175 | static int blk_end_aio(struct bio *bio, unsigned int bytes_done, int error) | 175 | static void blk_end_aio(struct bio *bio, int error) |
176 | { | 176 | { |
177 | struct kiocb *iocb = bio->bi_private; | 177 | struct kiocb *iocb = bio->bi_private; |
178 | atomic_t *bio_count = &iocb->ki_bio_count; | 178 | atomic_t *bio_count = &iocb->ki_bio_count; |
diff --git a/fs/buffer.c b/fs/buffer.c index 0e5ec371ce72..75b51dfa5e03 100644 --- a/fs/buffer.c +++ b/fs/buffer.c | |||
@@ -2634,13 +2634,10 @@ sector_t generic_block_bmap(struct address_space *mapping, sector_t block, | |||
2634 | return tmp.b_blocknr; | 2634 | return tmp.b_blocknr; |
2635 | } | 2635 | } |
2636 | 2636 | ||
2637 | static int end_bio_bh_io_sync(struct bio *bio, unsigned int bytes_done, int err) | 2637 | static void end_bio_bh_io_sync(struct bio *bio, int err) |
2638 | { | 2638 | { |
2639 | struct buffer_head *bh = bio->bi_private; | 2639 | struct buffer_head *bh = bio->bi_private; |
2640 | 2640 | ||
2641 | if (bio->bi_size) | ||
2642 | return 1; | ||
2643 | |||
2644 | if (err == -EOPNOTSUPP) { | 2641 | if (err == -EOPNOTSUPP) { |
2645 | set_bit(BIO_EOPNOTSUPP, &bio->bi_flags); | 2642 | set_bit(BIO_EOPNOTSUPP, &bio->bi_flags); |
2646 | set_bit(BH_Eopnotsupp, &bh->b_state); | 2643 | set_bit(BH_Eopnotsupp, &bh->b_state); |
@@ -2648,7 +2645,6 @@ static int end_bio_bh_io_sync(struct bio *bio, unsigned int bytes_done, int err) | |||
2648 | 2645 | ||
2649 | bh->b_end_io(bh, test_bit(BIO_UPTODATE, &bio->bi_flags)); | 2646 | bh->b_end_io(bh, test_bit(BIO_UPTODATE, &bio->bi_flags)); |
2650 | bio_put(bio); | 2647 | bio_put(bio); |
2651 | return 0; | ||
2652 | } | 2648 | } |
2653 | 2649 | ||
2654 | int submit_bh(int rw, struct buffer_head * bh) | 2650 | int submit_bh(int rw, struct buffer_head * bh) |
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c index d917e4a26a43..9c3fd07f35e0 100644 --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <linux/if.h> | 21 | #include <linux/if.h> |
22 | #include <linux/if_bridge.h> | 22 | #include <linux/if_bridge.h> |
23 | #include <linux/slab.h> | 23 | #include <linux/slab.h> |
24 | #include <linux/hdreg.h> | ||
25 | #include <linux/raid/md.h> | 24 | #include <linux/raid/md.h> |
26 | #include <linux/kd.h> | 25 | #include <linux/kd.h> |
27 | #include <linux/dirent.h> | 26 | #include <linux/dirent.h> |
@@ -33,12 +32,10 @@ | |||
33 | #include <linux/vt.h> | 32 | #include <linux/vt.h> |
34 | #include <linux/fs.h> | 33 | #include <linux/fs.h> |
35 | #include <linux/file.h> | 34 | #include <linux/file.h> |
36 | #include <linux/fd.h> | ||
37 | #include <linux/ppp_defs.h> | 35 | #include <linux/ppp_defs.h> |
38 | #include <linux/if_ppp.h> | 36 | #include <linux/if_ppp.h> |
39 | #include <linux/if_pppox.h> | 37 | #include <linux/if_pppox.h> |
40 | #include <linux/mtio.h> | 38 | #include <linux/mtio.h> |
41 | #include <linux/cdrom.h> | ||
42 | #include <linux/auto_fs.h> | 39 | #include <linux/auto_fs.h> |
43 | #include <linux/auto_fs4.h> | 40 | #include <linux/auto_fs4.h> |
44 | #include <linux/tty.h> | 41 | #include <linux/tty.h> |
@@ -48,7 +45,6 @@ | |||
48 | #include <linux/netdevice.h> | 45 | #include <linux/netdevice.h> |
49 | #include <linux/raw.h> | 46 | #include <linux/raw.h> |
50 | #include <linux/smb_fs.h> | 47 | #include <linux/smb_fs.h> |
51 | #include <linux/blkpg.h> | ||
52 | #include <linux/blkdev.h> | 48 | #include <linux/blkdev.h> |
53 | #include <linux/elevator.h> | 49 | #include <linux/elevator.h> |
54 | #include <linux/rtc.h> | 50 | #include <linux/rtc.h> |
@@ -62,7 +58,6 @@ | |||
62 | #include <linux/i2c-dev.h> | 58 | #include <linux/i2c-dev.h> |
63 | #include <linux/wireless.h> | 59 | #include <linux/wireless.h> |
64 | #include <linux/atalk.h> | 60 | #include <linux/atalk.h> |
65 | #include <linux/blktrace_api.h> | ||
66 | #include <linux/loop.h> | 61 | #include <linux/loop.h> |
67 | 62 | ||
68 | #include <net/bluetooth/bluetooth.h> | 63 | #include <net/bluetooth/bluetooth.h> |
@@ -667,53 +662,6 @@ out: | |||
667 | #endif | 662 | #endif |
668 | 663 | ||
669 | #ifdef CONFIG_BLOCK | 664 | #ifdef CONFIG_BLOCK |
670 | struct hd_geometry32 { | ||
671 | unsigned char heads; | ||
672 | unsigned char sectors; | ||
673 | unsigned short cylinders; | ||
674 | u32 start; | ||
675 | }; | ||
676 | |||
677 | static int hdio_getgeo(unsigned int fd, unsigned int cmd, unsigned long arg) | ||
678 | { | ||
679 | mm_segment_t old_fs = get_fs(); | ||
680 | struct hd_geometry geo; | ||
681 | struct hd_geometry32 __user *ugeo; | ||
682 | int err; | ||
683 | |||
684 | set_fs (KERNEL_DS); | ||
685 | err = sys_ioctl(fd, HDIO_GETGEO, (unsigned long)&geo); | ||
686 | set_fs (old_fs); | ||
687 | ugeo = compat_ptr(arg); | ||
688 | if (!err) { | ||
689 | err = copy_to_user (ugeo, &geo, 4); | ||
690 | err |= __put_user (geo.start, &ugeo->start); | ||
691 | if (err) | ||
692 | err = -EFAULT; | ||
693 | } | ||
694 | return err; | ||
695 | } | ||
696 | |||
697 | static int hdio_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg) | ||
698 | { | ||
699 | mm_segment_t old_fs = get_fs(); | ||
700 | unsigned long kval; | ||
701 | unsigned int __user *uvp; | ||
702 | int error; | ||
703 | |||
704 | set_fs(KERNEL_DS); | ||
705 | error = sys_ioctl(fd, cmd, (long)&kval); | ||
706 | set_fs(old_fs); | ||
707 | |||
708 | if(error == 0) { | ||
709 | uvp = compat_ptr(arg); | ||
710 | if(put_user(kval, uvp)) | ||
711 | error = -EFAULT; | ||
712 | } | ||
713 | return error; | ||
714 | } | ||
715 | |||
716 | |||
717 | typedef struct sg_io_hdr32 { | 665 | typedef struct sg_io_hdr32 { |
718 | compat_int_t interface_id; /* [i] 'S' for SCSI generic (required) */ | 666 | compat_int_t interface_id; /* [i] 'S' for SCSI generic (required) */ |
719 | compat_int_t dxfer_direction; /* [i] data transfer direction */ | 667 | compat_int_t dxfer_direction; /* [i] data transfer direction */ |
@@ -1088,108 +1036,6 @@ static int mt_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg) | |||
1088 | return err ? -EFAULT: 0; | 1036 | return err ? -EFAULT: 0; |
1089 | } | 1037 | } |
1090 | 1038 | ||
1091 | struct cdrom_read_audio32 { | ||
1092 | union cdrom_addr addr; | ||
1093 | u8 addr_format; | ||
1094 | compat_int_t nframes; | ||
1095 | compat_caddr_t buf; | ||
1096 | }; | ||
1097 | |||
1098 | struct cdrom_generic_command32 { | ||
1099 | unsigned char cmd[CDROM_PACKET_SIZE]; | ||
1100 | compat_caddr_t buffer; | ||
1101 | compat_uint_t buflen; | ||
1102 | compat_int_t stat; | ||
1103 | compat_caddr_t sense; | ||
1104 | unsigned char data_direction; | ||
1105 | compat_int_t quiet; | ||
1106 | compat_int_t timeout; | ||
1107 | compat_caddr_t reserved[1]; | ||
1108 | }; | ||
1109 | |||
1110 | static int cdrom_do_read_audio(unsigned int fd, unsigned int cmd, unsigned long arg) | ||
1111 | { | ||
1112 | struct cdrom_read_audio __user *cdread_audio; | ||
1113 | struct cdrom_read_audio32 __user *cdread_audio32; | ||
1114 | __u32 data; | ||
1115 | void __user *datap; | ||
1116 | |||
1117 | cdread_audio = compat_alloc_user_space(sizeof(*cdread_audio)); | ||
1118 | cdread_audio32 = compat_ptr(arg); | ||
1119 | |||
1120 | if (copy_in_user(&cdread_audio->addr, | ||
1121 | &cdread_audio32->addr, | ||
1122 | (sizeof(*cdread_audio32) - | ||
1123 | sizeof(compat_caddr_t)))) | ||
1124 | return -EFAULT; | ||
1125 | |||
1126 | if (get_user(data, &cdread_audio32->buf)) | ||
1127 | return -EFAULT; | ||
1128 | datap = compat_ptr(data); | ||
1129 | if (put_user(datap, &cdread_audio->buf)) | ||
1130 | return -EFAULT; | ||
1131 | |||
1132 | return sys_ioctl(fd, cmd, (unsigned long) cdread_audio); | ||
1133 | } | ||
1134 | |||
1135 | static int cdrom_do_generic_command(unsigned int fd, unsigned int cmd, unsigned long arg) | ||
1136 | { | ||
1137 | struct cdrom_generic_command __user *cgc; | ||
1138 | struct cdrom_generic_command32 __user *cgc32; | ||
1139 | u32 data; | ||
1140 | unsigned char dir; | ||
1141 | int itmp; | ||
1142 | |||
1143 | cgc = compat_alloc_user_space(sizeof(*cgc)); | ||
1144 | cgc32 = compat_ptr(arg); | ||
1145 | |||
1146 | if (copy_in_user(&cgc->cmd, &cgc32->cmd, sizeof(cgc->cmd)) || | ||
1147 | get_user(data, &cgc32->buffer) || | ||
1148 | put_user(compat_ptr(data), &cgc->buffer) || | ||
1149 | copy_in_user(&cgc->buflen, &cgc32->buflen, | ||
1150 | (sizeof(unsigned int) + sizeof(int))) || | ||
1151 | get_user(data, &cgc32->sense) || | ||
1152 | put_user(compat_ptr(data), &cgc->sense) || | ||
1153 | get_user(dir, &cgc32->data_direction) || | ||
1154 | put_user(dir, &cgc->data_direction) || | ||
1155 | get_user(itmp, &cgc32->quiet) || | ||
1156 | put_user(itmp, &cgc->quiet) || | ||
1157 | get_user(itmp, &cgc32->timeout) || | ||
1158 | put_user(itmp, &cgc->timeout) || | ||
1159 | get_user(data, &cgc32->reserved[0]) || | ||
1160 | put_user(compat_ptr(data), &cgc->reserved[0])) | ||
1161 | return -EFAULT; | ||
1162 | |||
1163 | return sys_ioctl(fd, cmd, (unsigned long) cgc); | ||
1164 | } | ||
1165 | |||
1166 | static int cdrom_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg) | ||
1167 | { | ||
1168 | int err; | ||
1169 | |||
1170 | switch(cmd) { | ||
1171 | case CDROMREADAUDIO: | ||
1172 | err = cdrom_do_read_audio(fd, cmd, arg); | ||
1173 | break; | ||
1174 | |||
1175 | case CDROM_SEND_PACKET: | ||
1176 | err = cdrom_do_generic_command(fd, cmd, arg); | ||
1177 | break; | ||
1178 | |||
1179 | default: | ||
1180 | do { | ||
1181 | static int count; | ||
1182 | if (++count <= 20) | ||
1183 | printk("cdrom_ioctl: Unknown cmd fd(%d) " | ||
1184 | "cmd(%08x) arg(%08x)\n", | ||
1185 | (int)fd, (unsigned int)cmd, (unsigned int)arg); | ||
1186 | } while(0); | ||
1187 | err = -EINVAL; | ||
1188 | break; | ||
1189 | }; | ||
1190 | |||
1191 | return err; | ||
1192 | } | ||
1193 | #endif /* CONFIG_BLOCK */ | 1039 | #endif /* CONFIG_BLOCK */ |
1194 | 1040 | ||
1195 | #ifdef CONFIG_VT | 1041 | #ifdef CONFIG_VT |
@@ -1535,71 +1381,11 @@ ret_einval(unsigned int fd, unsigned int cmd, unsigned long arg) | |||
1535 | return -EINVAL; | 1381 | return -EINVAL; |
1536 | } | 1382 | } |
1537 | 1383 | ||
1538 | #ifdef CONFIG_BLOCK | ||
1539 | static int broken_blkgetsize(unsigned int fd, unsigned int cmd, unsigned long arg) | ||
1540 | { | ||
1541 | /* The mkswap binary hard codes it to Intel value :-((( */ | ||
1542 | return w_long(fd, BLKGETSIZE, arg); | ||
1543 | } | ||
1544 | |||
1545 | struct blkpg_ioctl_arg32 { | ||
1546 | compat_int_t op; | ||
1547 | compat_int_t flags; | ||
1548 | compat_int_t datalen; | ||
1549 | compat_caddr_t data; | ||
1550 | }; | ||
1551 | |||
1552 | static int blkpg_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg) | ||
1553 | { | ||
1554 | struct blkpg_ioctl_arg32 __user *ua32 = compat_ptr(arg); | ||
1555 | struct blkpg_ioctl_arg __user *a = compat_alloc_user_space(sizeof(*a)); | ||
1556 | compat_caddr_t udata; | ||
1557 | compat_int_t n; | ||
1558 | int err; | ||
1559 | |||
1560 | err = get_user(n, &ua32->op); | ||
1561 | err |= put_user(n, &a->op); | ||
1562 | err |= get_user(n, &ua32->flags); | ||
1563 | err |= put_user(n, &a->flags); | ||
1564 | err |= get_user(n, &ua32->datalen); | ||
1565 | err |= put_user(n, &a->datalen); | ||
1566 | err |= get_user(udata, &ua32->data); | ||
1567 | err |= put_user(compat_ptr(udata), &a->data); | ||
1568 | if (err) | ||
1569 | return err; | ||
1570 | |||
1571 | return sys_ioctl(fd, cmd, (unsigned long)a); | ||
1572 | } | ||
1573 | #endif | ||
1574 | |||
1575 | static int ioc_settimeout(unsigned int fd, unsigned int cmd, unsigned long arg) | 1384 | static int ioc_settimeout(unsigned int fd, unsigned int cmd, unsigned long arg) |
1576 | { | 1385 | { |
1577 | return rw_long(fd, AUTOFS_IOC_SETTIMEOUT, arg); | 1386 | return rw_long(fd, AUTOFS_IOC_SETTIMEOUT, arg); |
1578 | } | 1387 | } |
1579 | 1388 | ||
1580 | #ifdef CONFIG_BLOCK | ||
1581 | /* Fix sizeof(sizeof()) breakage */ | ||
1582 | #define BLKBSZGET_32 _IOR(0x12,112,int) | ||
1583 | #define BLKBSZSET_32 _IOW(0x12,113,int) | ||
1584 | #define BLKGETSIZE64_32 _IOR(0x12,114,int) | ||
1585 | |||
1586 | static int do_blkbszget(unsigned int fd, unsigned int cmd, unsigned long arg) | ||
1587 | { | ||
1588 | return sys_ioctl(fd, BLKBSZGET, (unsigned long)compat_ptr(arg)); | ||
1589 | } | ||
1590 | |||
1591 | static int do_blkbszset(unsigned int fd, unsigned int cmd, unsigned long arg) | ||
1592 | { | ||
1593 | return sys_ioctl(fd, BLKBSZSET, (unsigned long)compat_ptr(arg)); | ||
1594 | } | ||
1595 | |||
1596 | static int do_blkgetsize64(unsigned int fd, unsigned int cmd, | ||
1597 | unsigned long arg) | ||
1598 | { | ||
1599 | return sys_ioctl(fd, BLKGETSIZE64, (unsigned long)compat_ptr(arg)); | ||
1600 | } | ||
1601 | #endif | ||
1602 | |||
1603 | /* Bluetooth ioctls */ | 1389 | /* Bluetooth ioctls */ |
1604 | #define HCIUARTSETPROTO _IOW('U', 200, int) | 1390 | #define HCIUARTSETPROTO _IOW('U', 200, int) |
1605 | #define HCIUARTGETPROTO _IOR('U', 201, int) | 1391 | #define HCIUARTGETPROTO _IOR('U', 201, int) |
@@ -1619,333 +1405,6 @@ static int do_blkgetsize64(unsigned int fd, unsigned int cmd, | |||
1619 | #define HIDPGETCONNLIST _IOR('H', 210, int) | 1405 | #define HIDPGETCONNLIST _IOR('H', 210, int) |
1620 | #define HIDPGETCONNINFO _IOR('H', 211, int) | 1406 | #define HIDPGETCONNINFO _IOR('H', 211, int) |
1621 | 1407 | ||
1622 | #ifdef CONFIG_BLOCK | ||
1623 | struct floppy_struct32 { | ||
1624 | compat_uint_t size; | ||
1625 | compat_uint_t sect; | ||
1626 | compat_uint_t head; | ||
1627 | compat_uint_t track; | ||
1628 | compat_uint_t stretch; | ||
1629 | unsigned char gap; | ||
1630 | unsigned char rate; | ||
1631 | unsigned char spec1; | ||
1632 | unsigned char fmt_gap; | ||
1633 | const compat_caddr_t name; | ||
1634 | }; | ||
1635 | |||
1636 | struct floppy_drive_params32 { | ||
1637 | char cmos; | ||
1638 | compat_ulong_t max_dtr; | ||
1639 | compat_ulong_t hlt; | ||
1640 | compat_ulong_t hut; | ||
1641 | compat_ulong_t srt; | ||
1642 | compat_ulong_t spinup; | ||
1643 | compat_ulong_t spindown; | ||
1644 | unsigned char spindown_offset; | ||
1645 | unsigned char select_delay; | ||
1646 | unsigned char rps; | ||
1647 | unsigned char tracks; | ||
1648 | compat_ulong_t timeout; | ||
1649 | unsigned char interleave_sect; | ||
1650 | struct floppy_max_errors max_errors; | ||
1651 | char flags; | ||
1652 | char read_track; | ||
1653 | short autodetect[8]; | ||
1654 | compat_int_t checkfreq; | ||
1655 | compat_int_t native_format; | ||
1656 | }; | ||
1657 | |||
1658 | struct floppy_drive_struct32 { | ||
1659 | signed char flags; | ||
1660 | compat_ulong_t spinup_date; | ||
1661 | compat_ulong_t select_date; | ||
1662 | compat_ulong_t first_read_date; | ||
1663 | short probed_format; | ||
1664 | short track; | ||
1665 | short maxblock; | ||
1666 | short maxtrack; | ||
1667 | compat_int_t generation; | ||
1668 | compat_int_t keep_data; | ||
1669 | compat_int_t fd_ref; | ||
1670 | compat_int_t fd_device; | ||
1671 | compat_int_t last_checked; | ||
1672 | compat_caddr_t dmabuf; | ||
1673 | compat_int_t bufblocks; | ||
1674 | }; | ||
1675 | |||
1676 | struct floppy_fdc_state32 { | ||
1677 | compat_int_t spec1; | ||
1678 | compat_int_t spec2; | ||
1679 | compat_int_t dtr; | ||
1680 | unsigned char version; | ||
1681 | unsigned char dor; | ||
1682 | compat_ulong_t address; | ||
1683 | unsigned int rawcmd:2; | ||
1684 | unsigned int reset:1; | ||
1685 | unsigned int need_configure:1; | ||
1686 | unsigned int perp_mode:2; | ||
1687 | unsigned int has_fifo:1; | ||
1688 | unsigned int driver_version; | ||
1689 | unsigned char track[4]; | ||
1690 | }; | ||
1691 | |||
1692 | struct floppy_write_errors32 { | ||
1693 | unsigned int write_errors; | ||
1694 | compat_ulong_t first_error_sector; | ||
1695 | compat_int_t first_error_generation; | ||
1696 | compat_ulong_t last_error_sector; | ||
1697 | compat_int_t last_error_generation; | ||
1698 | compat_uint_t badness; | ||
1699 | }; | ||
1700 | |||
1701 | #define FDSETPRM32 _IOW(2, 0x42, struct floppy_struct32) | ||
1702 | #define FDDEFPRM32 _IOW(2, 0x43, struct floppy_struct32) | ||
1703 | #define FDGETPRM32 _IOR(2, 0x04, struct floppy_struct32) | ||
1704 | #define FDSETDRVPRM32 _IOW(2, 0x90, struct floppy_drive_params32) | ||
1705 | #define FDGETDRVPRM32 _IOR(2, 0x11, struct floppy_drive_params32) | ||
1706 | #define FDGETDRVSTAT32 _IOR(2, 0x12, struct floppy_drive_struct32) | ||
1707 | #define FDPOLLDRVSTAT32 _IOR(2, 0x13, struct floppy_drive_struct32) | ||
1708 | #define FDGETFDCSTAT32 _IOR(2, 0x15, struct floppy_fdc_state32) | ||
1709 | #define FDWERRORGET32 _IOR(2, 0x17, struct floppy_write_errors32) | ||
1710 | |||
1711 | static struct { | ||
1712 | unsigned int cmd32; | ||
1713 | unsigned int cmd; | ||
1714 | } fd_ioctl_trans_table[] = { | ||
1715 | { FDSETPRM32, FDSETPRM }, | ||
1716 | { FDDEFPRM32, FDDEFPRM }, | ||
1717 | { FDGETPRM32, FDGETPRM }, | ||
1718 | { FDSETDRVPRM32, FDSETDRVPRM }, | ||
1719 | { FDGETDRVPRM32, FDGETDRVPRM }, | ||
1720 | { FDGETDRVSTAT32, FDGETDRVSTAT }, | ||
1721 | { FDPOLLDRVSTAT32, FDPOLLDRVSTAT }, | ||
1722 | { FDGETFDCSTAT32, FDGETFDCSTAT }, | ||
1723 | { FDWERRORGET32, FDWERRORGET } | ||
1724 | }; | ||
1725 | |||
1726 | #define NR_FD_IOCTL_TRANS ARRAY_SIZE(fd_ioctl_trans_table) | ||
1727 | |||
1728 | static int fd_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg) | ||
1729 | { | ||
1730 | mm_segment_t old_fs = get_fs(); | ||
1731 | void *karg = NULL; | ||
1732 | unsigned int kcmd = 0; | ||
1733 | int i, err; | ||
1734 | |||
1735 | for (i = 0; i < NR_FD_IOCTL_TRANS; i++) | ||
1736 | if (cmd == fd_ioctl_trans_table[i].cmd32) { | ||
1737 | kcmd = fd_ioctl_trans_table[i].cmd; | ||
1738 | break; | ||
1739 | } | ||
1740 | if (!kcmd) | ||
1741 | return -EINVAL; | ||
1742 | |||
1743 | switch (cmd) { | ||
1744 | case FDSETPRM32: | ||
1745 | case FDDEFPRM32: | ||
1746 | case FDGETPRM32: | ||
1747 | { | ||
1748 | compat_uptr_t name; | ||
1749 | struct floppy_struct32 __user *uf; | ||
1750 | struct floppy_struct *f; | ||
1751 | |||
1752 | uf = compat_ptr(arg); | ||
1753 | f = karg = kmalloc(sizeof(struct floppy_struct), GFP_KERNEL); | ||
1754 | if (!karg) | ||
1755 | return -ENOMEM; | ||
1756 | if (cmd == FDGETPRM32) | ||
1757 | break; | ||
1758 | err = __get_user(f->size, &uf->size); | ||
1759 | err |= __get_user(f->sect, &uf->sect); | ||
1760 | err |= __get_user(f->head, &uf->head); | ||
1761 | err |= __get_user(f->track, &uf->track); | ||
1762 | err |= __get_user(f->stretch, &uf->stretch); | ||
1763 | err |= __get_user(f->gap, &uf->gap); | ||
1764 | err |= __get_user(f->rate, &uf->rate); | ||
1765 | err |= __get_user(f->spec1, &uf->spec1); | ||
1766 | err |= __get_user(f->fmt_gap, &uf->fmt_gap); | ||
1767 | err |= __get_user(name, &uf->name); | ||
1768 | f->name = compat_ptr(name); | ||
1769 | if (err) { | ||
1770 | err = -EFAULT; | ||
1771 | goto out; | ||
1772 | } | ||
1773 | break; | ||
1774 | } | ||
1775 | case FDSETDRVPRM32: | ||
1776 | case FDGETDRVPRM32: | ||
1777 | { | ||
1778 | struct floppy_drive_params32 __user *uf; | ||
1779 | struct floppy_drive_params *f; | ||
1780 | |||
1781 | uf = compat_ptr(arg); | ||
1782 | f = karg = kmalloc(sizeof(struct floppy_drive_params), GFP_KERNEL); | ||
1783 | if (!karg) | ||
1784 | return -ENOMEM; | ||
1785 | if (cmd == FDGETDRVPRM32) | ||
1786 | break; | ||
1787 | err = __get_user(f->cmos, &uf->cmos); | ||
1788 | err |= __get_user(f->max_dtr, &uf->max_dtr); | ||
1789 | err |= __get_user(f->hlt, &uf->hlt); | ||
1790 | err |= __get_user(f->hut, &uf->hut); | ||
1791 | err |= __get_user(f->srt, &uf->srt); | ||
1792 | err |= __get_user(f->spinup, &uf->spinup); | ||
1793 | err |= __get_user(f->spindown, &uf->spindown); | ||
1794 | err |= __get_user(f->spindown_offset, &uf->spindown_offset); | ||
1795 | err |= __get_user(f->select_delay, &uf->select_delay); | ||
1796 | err |= __get_user(f->rps, &uf->rps); | ||
1797 | err |= __get_user(f->tracks, &uf->tracks); | ||
1798 | err |= __get_user(f->timeout, &uf->timeout); | ||
1799 | err |= __get_user(f->interleave_sect, &uf->interleave_sect); | ||
1800 | err |= __copy_from_user(&f->max_errors, &uf->max_errors, sizeof(f->max_errors)); | ||
1801 | err |= __get_user(f->flags, &uf->flags); | ||
1802 | err |= __get_user(f->read_track, &uf->read_track); | ||
1803 | err |= __copy_from_user(f->autodetect, uf->autodetect, sizeof(f->autodetect)); | ||
1804 | err |= __get_user(f->checkfreq, &uf->checkfreq); | ||
1805 | err |= __get_user(f->native_format, &uf->native_format); | ||
1806 | if (err) { | ||
1807 | err = -EFAULT; | ||
1808 | goto out; | ||
1809 | } | ||
1810 | break; | ||
1811 | } | ||
1812 | case FDGETDRVSTAT32: | ||
1813 | case FDPOLLDRVSTAT32: | ||
1814 | karg = kmalloc(sizeof(struct floppy_drive_struct), GFP_KERNEL); | ||
1815 | if (!karg) | ||
1816 | return -ENOMEM; | ||
1817 | break; | ||
1818 | case FDGETFDCSTAT32: | ||
1819 | karg = kmalloc(sizeof(struct floppy_fdc_state), GFP_KERNEL); | ||
1820 | if (!karg) | ||
1821 | return -ENOMEM; | ||
1822 | break; | ||
1823 | case FDWERRORGET32: | ||
1824 | karg = kmalloc(sizeof(struct floppy_write_errors), GFP_KERNEL); | ||
1825 | if (!karg) | ||
1826 | return -ENOMEM; | ||
1827 | break; | ||
1828 | default: | ||
1829 | return -EINVAL; | ||
1830 | } | ||
1831 | set_fs (KERNEL_DS); | ||
1832 | err = sys_ioctl (fd, kcmd, (unsigned long)karg); | ||
1833 | set_fs (old_fs); | ||
1834 | if (err) | ||
1835 | goto out; | ||
1836 | switch (cmd) { | ||
1837 | case FDGETPRM32: | ||
1838 | { | ||
1839 | struct floppy_struct *f = karg; | ||
1840 | struct floppy_struct32 __user *uf = compat_ptr(arg); | ||
1841 | |||
1842 | err = __put_user(f->size, &uf->size); | ||
1843 | err |= __put_user(f->sect, &uf->sect); | ||
1844 | err |= __put_user(f->head, &uf->head); | ||
1845 | err |= __put_user(f->track, &uf->track); | ||
1846 | err |= __put_user(f->stretch, &uf->stretch); | ||
1847 | err |= __put_user(f->gap, &uf->gap); | ||
1848 | err |= __put_user(f->rate, &uf->rate); | ||
1849 | err |= __put_user(f->spec1, &uf->spec1); | ||
1850 | err |= __put_user(f->fmt_gap, &uf->fmt_gap); | ||
1851 | err |= __put_user((u64)f->name, (compat_caddr_t __user *)&uf->name); | ||
1852 | break; | ||
1853 | } | ||
1854 | case FDGETDRVPRM32: | ||
1855 | { | ||
1856 | struct floppy_drive_params32 __user *uf; | ||
1857 | struct floppy_drive_params *f = karg; | ||
1858 | |||
1859 | uf = compat_ptr(arg); | ||
1860 | err = __put_user(f->cmos, &uf->cmos); | ||
1861 | err |= __put_user(f->max_dtr, &uf->max_dtr); | ||
1862 | err |= __put_user(f->hlt, &uf->hlt); | ||
1863 | err |= __put_user(f->hut, &uf->hut); | ||
1864 | err |= __put_user(f->srt, &uf->srt); | ||
1865 | err |= __put_user(f->spinup, &uf->spinup); | ||
1866 | err |= __put_user(f->spindown, &uf->spindown); | ||
1867 | err |= __put_user(f->spindown_offset, &uf->spindown_offset); | ||
1868 | err |= __put_user(f->select_delay, &uf->select_delay); | ||
1869 | err |= __put_user(f->rps, &uf->rps); | ||
1870 | err |= __put_user(f->tracks, &uf->tracks); | ||
1871 | err |= __put_user(f->timeout, &uf->timeout); | ||
1872 | err |= __put_user(f->interleave_sect, &uf->interleave_sect); | ||
1873 | err |= __copy_to_user(&uf->max_errors, &f->max_errors, sizeof(f->max_errors)); | ||
1874 | err |= __put_user(f->flags, &uf->flags); | ||
1875 | err |= __put_user(f->read_track, &uf->read_track); | ||
1876 | err |= __copy_to_user(uf->autodetect, f->autodetect, sizeof(f->autodetect)); | ||
1877 | err |= __put_user(f->checkfreq, &uf->checkfreq); | ||
1878 | err |= __put_user(f->native_format, &uf->native_format); | ||
1879 | break; | ||
1880 | } | ||
1881 | case FDGETDRVSTAT32: | ||
1882 | case FDPOLLDRVSTAT32: | ||
1883 | { | ||
1884 | struct floppy_drive_struct32 __user *uf; | ||
1885 | struct floppy_drive_struct *f = karg; | ||
1886 | |||
1887 | uf = compat_ptr(arg); | ||
1888 | err = __put_user(f->flags, &uf->flags); | ||
1889 | err |= __put_user(f->spinup_date, &uf->spinup_date); | ||
1890 | err |= __put_user(f->select_date, &uf->select_date); | ||
1891 | err |= __put_user(f->first_read_date, &uf->first_read_date); | ||
1892 | err |= __put_user(f->probed_format, &uf->probed_format); | ||
1893 | err |= __put_user(f->track, &uf->track); | ||
1894 | err |= __put_user(f->maxblock, &uf->maxblock); | ||
1895 | err |= __put_user(f->maxtrack, &uf->maxtrack); | ||
1896 | err |= __put_user(f->generation, &uf->generation); | ||
1897 | err |= __put_user(f->keep_data, &uf->keep_data); | ||
1898 | err |= __put_user(f->fd_ref, &uf->fd_ref); | ||
1899 | err |= __put_user(f->fd_device, &uf->fd_device); | ||
1900 | err |= __put_user(f->last_checked, &uf->last_checked); | ||
1901 | err |= __put_user((u64)f->dmabuf, &uf->dmabuf); | ||
1902 | err |= __put_user((u64)f->bufblocks, &uf->bufblocks); | ||
1903 | break; | ||
1904 | } | ||
1905 | case FDGETFDCSTAT32: | ||
1906 | { | ||
1907 | struct floppy_fdc_state32 __user *uf; | ||
1908 | struct floppy_fdc_state *f = karg; | ||
1909 | |||
1910 | uf = compat_ptr(arg); | ||
1911 | err = __put_user(f->spec1, &uf->spec1); | ||
1912 | err |= __put_user(f->spec2, &uf->spec2); | ||
1913 | err |= __put_user(f->dtr, &uf->dtr); | ||
1914 | err |= __put_user(f->version, &uf->version); | ||
1915 | err |= __put_user(f->dor, &uf->dor); | ||
1916 | err |= __put_user(f->address, &uf->address); | ||
1917 | err |= __copy_to_user((char __user *)&uf->address + sizeof(uf->address), | ||
1918 | (char *)&f->address + sizeof(f->address), sizeof(int)); | ||
1919 | err |= __put_user(f->driver_version, &uf->driver_version); | ||
1920 | err |= __copy_to_user(uf->track, f->track, sizeof(f->track)); | ||
1921 | break; | ||
1922 | } | ||
1923 | case FDWERRORGET32: | ||
1924 | { | ||
1925 | struct floppy_write_errors32 __user *uf; | ||
1926 | struct floppy_write_errors *f = karg; | ||
1927 | |||
1928 | uf = compat_ptr(arg); | ||
1929 | err = __put_user(f->write_errors, &uf->write_errors); | ||
1930 | err |= __put_user(f->first_error_sector, &uf->first_error_sector); | ||
1931 | err |= __put_user(f->first_error_generation, &uf->first_error_generation); | ||
1932 | err |= __put_user(f->last_error_sector, &uf->last_error_sector); | ||
1933 | err |= __put_user(f->last_error_generation, &uf->last_error_generation); | ||
1934 | err |= __put_user(f->badness, &uf->badness); | ||
1935 | break; | ||
1936 | } | ||
1937 | default: | ||
1938 | break; | ||
1939 | } | ||
1940 | if (err) | ||
1941 | err = -EFAULT; | ||
1942 | |||
1943 | out: | ||
1944 | kfree(karg); | ||
1945 | return err; | ||
1946 | } | ||
1947 | #endif | ||
1948 | |||
1949 | struct mtd_oob_buf32 { | 1408 | struct mtd_oob_buf32 { |
1950 | u_int32_t start; | 1409 | u_int32_t start; |
1951 | u_int32_t length; | 1410 | u_int32_t length; |
@@ -2505,60 +1964,6 @@ COMPATIBLE_IOCTL(FIONREAD) /* This is also TIOCINQ */ | |||
2505 | /* 0x00 */ | 1964 | /* 0x00 */ |
2506 | COMPATIBLE_IOCTL(FIBMAP) | 1965 | COMPATIBLE_IOCTL(FIBMAP) |
2507 | COMPATIBLE_IOCTL(FIGETBSZ) | 1966 | COMPATIBLE_IOCTL(FIGETBSZ) |
2508 | /* 0x03 -- HD/IDE ioctl's used by hdparm and friends. | ||
2509 | * Some need translations, these do not. | ||
2510 | */ | ||
2511 | COMPATIBLE_IOCTL(HDIO_GET_IDENTITY) | ||
2512 | COMPATIBLE_IOCTL(HDIO_DRIVE_TASK) | ||
2513 | COMPATIBLE_IOCTL(HDIO_DRIVE_CMD) | ||
2514 | ULONG_IOCTL(HDIO_SET_MULTCOUNT) | ||
2515 | ULONG_IOCTL(HDIO_SET_UNMASKINTR) | ||
2516 | ULONG_IOCTL(HDIO_SET_KEEPSETTINGS) | ||
2517 | ULONG_IOCTL(HDIO_SET_32BIT) | ||
2518 | ULONG_IOCTL(HDIO_SET_NOWERR) | ||
2519 | ULONG_IOCTL(HDIO_SET_DMA) | ||
2520 | ULONG_IOCTL(HDIO_SET_PIO_MODE) | ||
2521 | ULONG_IOCTL(HDIO_SET_NICE) | ||
2522 | ULONG_IOCTL(HDIO_SET_WCACHE) | ||
2523 | ULONG_IOCTL(HDIO_SET_ACOUSTIC) | ||
2524 | ULONG_IOCTL(HDIO_SET_BUSSTATE) | ||
2525 | ULONG_IOCTL(HDIO_SET_ADDRESS) | ||
2526 | COMPATIBLE_IOCTL(HDIO_SCAN_HWIF) | ||
2527 | /* 0x330 is reserved -- it used to be HDIO_GETGEO_BIG */ | ||
2528 | COMPATIBLE_IOCTL(0x330) | ||
2529 | /* 0x02 -- Floppy ioctls */ | ||
2530 | COMPATIBLE_IOCTL(FDMSGON) | ||
2531 | COMPATIBLE_IOCTL(FDMSGOFF) | ||
2532 | COMPATIBLE_IOCTL(FDSETEMSGTRESH) | ||
2533 | COMPATIBLE_IOCTL(FDFLUSH) | ||
2534 | COMPATIBLE_IOCTL(FDWERRORCLR) | ||
2535 | COMPATIBLE_IOCTL(FDSETMAXERRS) | ||
2536 | COMPATIBLE_IOCTL(FDGETMAXERRS) | ||
2537 | COMPATIBLE_IOCTL(FDGETDRVTYP) | ||
2538 | COMPATIBLE_IOCTL(FDEJECT) | ||
2539 | COMPATIBLE_IOCTL(FDCLRPRM) | ||
2540 | COMPATIBLE_IOCTL(FDFMTBEG) | ||
2541 | COMPATIBLE_IOCTL(FDFMTEND) | ||
2542 | COMPATIBLE_IOCTL(FDRESET) | ||
2543 | COMPATIBLE_IOCTL(FDTWADDLE) | ||
2544 | COMPATIBLE_IOCTL(FDFMTTRK) | ||
2545 | COMPATIBLE_IOCTL(FDRAWCMD) | ||
2546 | /* 0x12 */ | ||
2547 | #ifdef CONFIG_BLOCK | ||
2548 | COMPATIBLE_IOCTL(BLKRASET) | ||
2549 | COMPATIBLE_IOCTL(BLKROSET) | ||
2550 | COMPATIBLE_IOCTL(BLKROGET) | ||
2551 | COMPATIBLE_IOCTL(BLKRRPART) | ||
2552 | COMPATIBLE_IOCTL(BLKFLSBUF) | ||
2553 | COMPATIBLE_IOCTL(BLKSECTSET) | ||
2554 | COMPATIBLE_IOCTL(BLKSSZGET) | ||
2555 | COMPATIBLE_IOCTL(BLKTRACESTART) | ||
2556 | COMPATIBLE_IOCTL(BLKTRACESTOP) | ||
2557 | COMPATIBLE_IOCTL(BLKTRACESETUP) | ||
2558 | COMPATIBLE_IOCTL(BLKTRACETEARDOWN) | ||
2559 | ULONG_IOCTL(BLKRASET) | ||
2560 | ULONG_IOCTL(BLKFRASET) | ||
2561 | #endif | ||
2562 | /* RAID */ | 1967 | /* RAID */ |
2563 | COMPATIBLE_IOCTL(RAID_VERSION) | 1968 | COMPATIBLE_IOCTL(RAID_VERSION) |
2564 | COMPATIBLE_IOCTL(GET_ARRAY_INFO) | 1969 | COMPATIBLE_IOCTL(GET_ARRAY_INFO) |
@@ -2806,50 +2211,6 @@ COMPATIBLE_IOCTL(PPGETMODE) | |||
2806 | COMPATIBLE_IOCTL(PPGETPHASE) | 2211 | COMPATIBLE_IOCTL(PPGETPHASE) |
2807 | COMPATIBLE_IOCTL(PPGETFLAGS) | 2212 | COMPATIBLE_IOCTL(PPGETFLAGS) |
2808 | COMPATIBLE_IOCTL(PPSETFLAGS) | 2213 | COMPATIBLE_IOCTL(PPSETFLAGS) |
2809 | /* CDROM stuff */ | ||
2810 | COMPATIBLE_IOCTL(CDROMPAUSE) | ||
2811 | COMPATIBLE_IOCTL(CDROMRESUME) | ||
2812 | COMPATIBLE_IOCTL(CDROMPLAYMSF) | ||
2813 | COMPATIBLE_IOCTL(CDROMPLAYTRKIND) | ||
2814 | COMPATIBLE_IOCTL(CDROMREADTOCHDR) | ||
2815 | COMPATIBLE_IOCTL(CDROMREADTOCENTRY) | ||
2816 | COMPATIBLE_IOCTL(CDROMSTOP) | ||
2817 | COMPATIBLE_IOCTL(CDROMSTART) | ||
2818 | COMPATIBLE_IOCTL(CDROMEJECT) | ||
2819 | COMPATIBLE_IOCTL(CDROMVOLCTRL) | ||
2820 | COMPATIBLE_IOCTL(CDROMSUBCHNL) | ||
2821 | ULONG_IOCTL(CDROMEJECT_SW) | ||
2822 | COMPATIBLE_IOCTL(CDROMMULTISESSION) | ||
2823 | COMPATIBLE_IOCTL(CDROM_GET_MCN) | ||
2824 | COMPATIBLE_IOCTL(CDROMRESET) | ||
2825 | COMPATIBLE_IOCTL(CDROMVOLREAD) | ||
2826 | COMPATIBLE_IOCTL(CDROMSEEK) | ||
2827 | COMPATIBLE_IOCTL(CDROMPLAYBLK) | ||
2828 | COMPATIBLE_IOCTL(CDROMCLOSETRAY) | ||
2829 | ULONG_IOCTL(CDROM_SET_OPTIONS) | ||
2830 | ULONG_IOCTL(CDROM_CLEAR_OPTIONS) | ||
2831 | ULONG_IOCTL(CDROM_SELECT_SPEED) | ||
2832 | ULONG_IOCTL(CDROM_SELECT_DISC) | ||
2833 | ULONG_IOCTL(CDROM_MEDIA_CHANGED) | ||
2834 | ULONG_IOCTL(CDROM_DRIVE_STATUS) | ||
2835 | COMPATIBLE_IOCTL(CDROM_DISC_STATUS) | ||
2836 | COMPATIBLE_IOCTL(CDROM_CHANGER_NSLOTS) | ||
2837 | ULONG_IOCTL(CDROM_LOCKDOOR) | ||
2838 | ULONG_IOCTL(CDROM_DEBUG) | ||
2839 | COMPATIBLE_IOCTL(CDROM_GET_CAPABILITY) | ||
2840 | /* Ignore cdrom.h about these next 5 ioctls, they absolutely do | ||
2841 | * not take a struct cdrom_read, instead they take a struct cdrom_msf | ||
2842 | * which is compatible. | ||
2843 | */ | ||
2844 | COMPATIBLE_IOCTL(CDROMREADMODE2) | ||
2845 | COMPATIBLE_IOCTL(CDROMREADMODE1) | ||
2846 | COMPATIBLE_IOCTL(CDROMREADRAW) | ||
2847 | COMPATIBLE_IOCTL(CDROMREADCOOKED) | ||
2848 | COMPATIBLE_IOCTL(CDROMREADALL) | ||
2849 | /* DVD ioctls */ | ||
2850 | COMPATIBLE_IOCTL(DVD_READ_STRUCT) | ||
2851 | COMPATIBLE_IOCTL(DVD_WRITE_STRUCT) | ||
2852 | COMPATIBLE_IOCTL(DVD_AUTH) | ||
2853 | /* pktcdvd */ | 2214 | /* pktcdvd */ |
2854 | COMPATIBLE_IOCTL(PACKET_CTRL_CMD) | 2215 | COMPATIBLE_IOCTL(PACKET_CTRL_CMD) |
2855 | /* Big A */ | 2216 | /* Big A */ |
@@ -3335,33 +2696,6 @@ HANDLE_IOCTL(SIOCGSTAMP, do_siocgstamp) | |||
3335 | HANDLE_IOCTL(SIOCGSTAMPNS, do_siocgstampns) | 2696 | HANDLE_IOCTL(SIOCGSTAMPNS, do_siocgstampns) |
3336 | #endif | 2697 | #endif |
3337 | #ifdef CONFIG_BLOCK | 2698 | #ifdef CONFIG_BLOCK |
3338 | HANDLE_IOCTL(HDIO_GETGEO, hdio_getgeo) | ||
3339 | HANDLE_IOCTL(BLKRAGET, w_long) | ||
3340 | HANDLE_IOCTL(BLKGETSIZE, w_long) | ||
3341 | HANDLE_IOCTL(0x1260, broken_blkgetsize) | ||
3342 | HANDLE_IOCTL(BLKFRAGET, w_long) | ||
3343 | HANDLE_IOCTL(BLKSECTGET, w_long) | ||
3344 | HANDLE_IOCTL(BLKPG, blkpg_ioctl_trans) | ||
3345 | HANDLE_IOCTL(HDIO_GET_UNMASKINTR, hdio_ioctl_trans) | ||
3346 | HANDLE_IOCTL(HDIO_GET_MULTCOUNT, hdio_ioctl_trans) | ||
3347 | HANDLE_IOCTL(HDIO_GET_KEEPSETTINGS, hdio_ioctl_trans) | ||
3348 | HANDLE_IOCTL(HDIO_GET_32BIT, hdio_ioctl_trans) | ||
3349 | HANDLE_IOCTL(HDIO_GET_NOWERR, hdio_ioctl_trans) | ||
3350 | HANDLE_IOCTL(HDIO_GET_DMA, hdio_ioctl_trans) | ||
3351 | HANDLE_IOCTL(HDIO_GET_NICE, hdio_ioctl_trans) | ||
3352 | HANDLE_IOCTL(HDIO_GET_WCACHE, hdio_ioctl_trans) | ||
3353 | HANDLE_IOCTL(HDIO_GET_ACOUSTIC, hdio_ioctl_trans) | ||
3354 | HANDLE_IOCTL(HDIO_GET_ADDRESS, hdio_ioctl_trans) | ||
3355 | HANDLE_IOCTL(HDIO_GET_BUSSTATE, hdio_ioctl_trans) | ||
3356 | HANDLE_IOCTL(FDSETPRM32, fd_ioctl_trans) | ||
3357 | HANDLE_IOCTL(FDDEFPRM32, fd_ioctl_trans) | ||
3358 | HANDLE_IOCTL(FDGETPRM32, fd_ioctl_trans) | ||
3359 | HANDLE_IOCTL(FDSETDRVPRM32, fd_ioctl_trans) | ||
3360 | HANDLE_IOCTL(FDGETDRVPRM32, fd_ioctl_trans) | ||
3361 | HANDLE_IOCTL(FDGETDRVSTAT32, fd_ioctl_trans) | ||
3362 | HANDLE_IOCTL(FDPOLLDRVSTAT32, fd_ioctl_trans) | ||
3363 | HANDLE_IOCTL(FDGETFDCSTAT32, fd_ioctl_trans) | ||
3364 | HANDLE_IOCTL(FDWERRORGET32, fd_ioctl_trans) | ||
3365 | HANDLE_IOCTL(SG_IO,sg_ioctl_trans) | 2699 | HANDLE_IOCTL(SG_IO,sg_ioctl_trans) |
3366 | HANDLE_IOCTL(SG_GET_REQUEST_TABLE, sg_grt_trans) | 2700 | HANDLE_IOCTL(SG_GET_REQUEST_TABLE, sg_grt_trans) |
3367 | #endif | 2701 | #endif |
@@ -3372,8 +2706,6 @@ HANDLE_IOCTL(PPPIOCSACTIVE32, ppp_sock_fprog_ioctl_trans) | |||
3372 | #ifdef CONFIG_BLOCK | 2706 | #ifdef CONFIG_BLOCK |
3373 | HANDLE_IOCTL(MTIOCGET32, mt_ioctl_trans) | 2707 | HANDLE_IOCTL(MTIOCGET32, mt_ioctl_trans) |
3374 | HANDLE_IOCTL(MTIOCPOS32, mt_ioctl_trans) | 2708 | HANDLE_IOCTL(MTIOCPOS32, mt_ioctl_trans) |
3375 | HANDLE_IOCTL(CDROMREADAUDIO, cdrom_ioctl_trans) | ||
3376 | HANDLE_IOCTL(CDROM_SEND_PACKET, cdrom_ioctl_trans) | ||
3377 | #endif | 2709 | #endif |
3378 | #define AUTOFS_IOC_SETTIMEOUT32 _IOWR(0x93,0x64,unsigned int) | 2710 | #define AUTOFS_IOC_SETTIMEOUT32 _IOWR(0x93,0x64,unsigned int) |
3379 | HANDLE_IOCTL(AUTOFS_IOC_SETTIMEOUT32, ioc_settimeout) | 2711 | HANDLE_IOCTL(AUTOFS_IOC_SETTIMEOUT32, ioc_settimeout) |
@@ -3414,9 +2746,6 @@ HANDLE_IOCTL(SONET_GETFRAMING, do_atm_ioctl) | |||
3414 | HANDLE_IOCTL(SONET_GETFRSENSE, do_atm_ioctl) | 2746 | HANDLE_IOCTL(SONET_GETFRSENSE, do_atm_ioctl) |
3415 | /* block stuff */ | 2747 | /* block stuff */ |
3416 | #ifdef CONFIG_BLOCK | 2748 | #ifdef CONFIG_BLOCK |
3417 | HANDLE_IOCTL(BLKBSZGET_32, do_blkbszget) | ||
3418 | HANDLE_IOCTL(BLKBSZSET_32, do_blkbszset) | ||
3419 | HANDLE_IOCTL(BLKGETSIZE64_32, do_blkgetsize64) | ||
3420 | /* Raw devices */ | 2749 | /* Raw devices */ |
3421 | HANDLE_IOCTL(RAW_SETBIND, raw_ioctl) | 2750 | HANDLE_IOCTL(RAW_SETBIND, raw_ioctl) |
3422 | HANDLE_IOCTL(RAW_GETBIND, raw_ioctl) | 2751 | HANDLE_IOCTL(RAW_GETBIND, raw_ioctl) |
diff --git a/fs/direct-io.c b/fs/direct-io.c index 901dc55e9f54..b5928a7b6a5a 100644 --- a/fs/direct-io.c +++ b/fs/direct-io.c | |||
@@ -264,15 +264,12 @@ static int dio_bio_complete(struct dio *dio, struct bio *bio); | |||
264 | /* | 264 | /* |
265 | * Asynchronous IO callback. | 265 | * Asynchronous IO callback. |
266 | */ | 266 | */ |
267 | static int dio_bio_end_aio(struct bio *bio, unsigned int bytes_done, int error) | 267 | static void dio_bio_end_aio(struct bio *bio, int error) |
268 | { | 268 | { |
269 | struct dio *dio = bio->bi_private; | 269 | struct dio *dio = bio->bi_private; |
270 | unsigned long remaining; | 270 | unsigned long remaining; |
271 | unsigned long flags; | 271 | unsigned long flags; |
272 | 272 | ||
273 | if (bio->bi_size) | ||
274 | return 1; | ||
275 | |||
276 | /* cleanup the bio */ | 273 | /* cleanup the bio */ |
277 | dio_bio_complete(dio, bio); | 274 | dio_bio_complete(dio, bio); |
278 | 275 | ||
@@ -287,8 +284,6 @@ static int dio_bio_end_aio(struct bio *bio, unsigned int bytes_done, int error) | |||
287 | aio_complete(dio->iocb, ret, 0); | 284 | aio_complete(dio->iocb, ret, 0); |
288 | kfree(dio); | 285 | kfree(dio); |
289 | } | 286 | } |
290 | |||
291 | return 0; | ||
292 | } | 287 | } |
293 | 288 | ||
294 | /* | 289 | /* |
@@ -298,21 +293,17 @@ static int dio_bio_end_aio(struct bio *bio, unsigned int bytes_done, int error) | |||
298 | * During I/O bi_private points at the dio. After I/O, bi_private is used to | 293 | * During I/O bi_private points at the dio. After I/O, bi_private is used to |
299 | * implement a singly-linked list of completed BIOs, at dio->bio_list. | 294 | * implement a singly-linked list of completed BIOs, at dio->bio_list. |
300 | */ | 295 | */ |
301 | static int dio_bio_end_io(struct bio *bio, unsigned int bytes_done, int error) | 296 | static void dio_bio_end_io(struct bio *bio, int error) |
302 | { | 297 | { |
303 | struct dio *dio = bio->bi_private; | 298 | struct dio *dio = bio->bi_private; |
304 | unsigned long flags; | 299 | unsigned long flags; |
305 | 300 | ||
306 | if (bio->bi_size) | ||
307 | return 1; | ||
308 | |||
309 | spin_lock_irqsave(&dio->bio_lock, flags); | 301 | spin_lock_irqsave(&dio->bio_lock, flags); |
310 | bio->bi_private = dio->bio_list; | 302 | bio->bi_private = dio->bio_list; |
311 | dio->bio_list = bio; | 303 | dio->bio_list = bio; |
312 | if (--dio->refcount == 1 && dio->waiter) | 304 | if (--dio->refcount == 1 && dio->waiter) |
313 | wake_up_process(dio->waiter); | 305 | wake_up_process(dio->waiter); |
314 | spin_unlock_irqrestore(&dio->bio_lock, flags); | 306 | spin_unlock_irqrestore(&dio->bio_lock, flags); |
315 | return 0; | ||
316 | } | 307 | } |
317 | 308 | ||
318 | static int | 309 | static int |
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index a4b142a6a2c7..8d23b0b38717 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c | |||
@@ -14,6 +14,7 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/module.h> | ||
17 | #include <linux/spinlock.h> | 18 | #include <linux/spinlock.h> |
18 | #include <linux/sched.h> | 19 | #include <linux/sched.h> |
19 | #include <linux/fs.h> | 20 | #include <linux/fs.h> |
diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c index f916b9740c75..2473e2a86d1b 100644 --- a/fs/gfs2/super.c +++ b/fs/gfs2/super.c | |||
@@ -160,11 +160,9 @@ int gfs2_check_sb(struct gfs2_sbd *sdp, struct gfs2_sb_host *sb, int silent) | |||
160 | } | 160 | } |
161 | 161 | ||
162 | 162 | ||
163 | static int end_bio_io_page(struct bio *bio, unsigned int bytes_done, int error) | 163 | static void end_bio_io_page(struct bio *bio, int error) |
164 | { | 164 | { |
165 | struct page *page = bio->bi_private; | 165 | struct page *page = bio->bi_private; |
166 | if (bio->bi_size) | ||
167 | return 1; | ||
168 | 166 | ||
169 | if (!error) | 167 | if (!error) |
170 | SetPageUptodate(page); | 168 | SetPageUptodate(page); |
diff --git a/fs/jfs/jfs_logmgr.c b/fs/jfs/jfs_logmgr.c index de3e4a506dbc..57c3b8ac36bf 100644 --- a/fs/jfs/jfs_logmgr.c +++ b/fs/jfs/jfs_logmgr.c | |||
@@ -2200,16 +2200,13 @@ static int lbmIOWait(struct lbuf * bp, int flag) | |||
2200 | * | 2200 | * |
2201 | * executed at INTIODONE level | 2201 | * executed at INTIODONE level |
2202 | */ | 2202 | */ |
2203 | static int lbmIODone(struct bio *bio, unsigned int bytes_done, int error) | 2203 | static void lbmIODone(struct bio *bio, int error) |
2204 | { | 2204 | { |
2205 | struct lbuf *bp = bio->bi_private; | 2205 | struct lbuf *bp = bio->bi_private; |
2206 | struct lbuf *nextbp, *tail; | 2206 | struct lbuf *nextbp, *tail; |
2207 | struct jfs_log *log; | 2207 | struct jfs_log *log; |
2208 | unsigned long flags; | 2208 | unsigned long flags; |
2209 | 2209 | ||
2210 | if (bio->bi_size) | ||
2211 | return 1; | ||
2212 | |||
2213 | /* | 2210 | /* |
2214 | * get back jfs buffer bound to the i/o buffer | 2211 | * get back jfs buffer bound to the i/o buffer |
2215 | */ | 2212 | */ |
diff --git a/fs/jfs/jfs_metapage.c b/fs/jfs/jfs_metapage.c index 62e96be02acf..1332adc0b9fa 100644 --- a/fs/jfs/jfs_metapage.c +++ b/fs/jfs/jfs_metapage.c | |||
@@ -280,14 +280,10 @@ static void last_read_complete(struct page *page) | |||
280 | unlock_page(page); | 280 | unlock_page(page); |
281 | } | 281 | } |
282 | 282 | ||
283 | static int metapage_read_end_io(struct bio *bio, unsigned int bytes_done, | 283 | static void metapage_read_end_io(struct bio *bio, int err) |
284 | int err) | ||
285 | { | 284 | { |
286 | struct page *page = bio->bi_private; | 285 | struct page *page = bio->bi_private; |
287 | 286 | ||
288 | if (bio->bi_size) | ||
289 | return 1; | ||
290 | |||
291 | if (!test_bit(BIO_UPTODATE, &bio->bi_flags)) { | 287 | if (!test_bit(BIO_UPTODATE, &bio->bi_flags)) { |
292 | printk(KERN_ERR "metapage_read_end_io: I/O error\n"); | 288 | printk(KERN_ERR "metapage_read_end_io: I/O error\n"); |
293 | SetPageError(page); | 289 | SetPageError(page); |
@@ -341,16 +337,12 @@ static void last_write_complete(struct page *page) | |||
341 | end_page_writeback(page); | 337 | end_page_writeback(page); |
342 | } | 338 | } |
343 | 339 | ||
344 | static int metapage_write_end_io(struct bio *bio, unsigned int bytes_done, | 340 | static void metapage_write_end_io(struct bio *bio, int err) |
345 | int err) | ||
346 | { | 341 | { |
347 | struct page *page = bio->bi_private; | 342 | struct page *page = bio->bi_private; |
348 | 343 | ||
349 | BUG_ON(!PagePrivate(page)); | 344 | BUG_ON(!PagePrivate(page)); |
350 | 345 | ||
351 | if (bio->bi_size) | ||
352 | return 1; | ||
353 | |||
354 | if (! test_bit(BIO_UPTODATE, &bio->bi_flags)) { | 346 | if (! test_bit(BIO_UPTODATE, &bio->bi_flags)) { |
355 | printk(KERN_ERR "metapage_write_end_io: I/O error\n"); | 347 | printk(KERN_ERR "metapage_write_end_io: I/O error\n"); |
356 | SetPageError(page); | 348 | SetPageError(page); |
diff --git a/fs/mpage.c b/fs/mpage.c index c1698f2291aa..b1c3e5890508 100644 --- a/fs/mpage.c +++ b/fs/mpage.c | |||
@@ -39,14 +39,11 @@ | |||
39 | * status of that page is hard. See end_buffer_async_read() for the details. | 39 | * status of that page is hard. See end_buffer_async_read() for the details. |
40 | * There is no point in duplicating all that complexity. | 40 | * There is no point in duplicating all that complexity. |
41 | */ | 41 | */ |
42 | static int mpage_end_io_read(struct bio *bio, unsigned int bytes_done, int err) | 42 | static void mpage_end_io_read(struct bio *bio, int err) |
43 | { | 43 | { |
44 | const int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags); | 44 | const int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags); |
45 | struct bio_vec *bvec = bio->bi_io_vec + bio->bi_vcnt - 1; | 45 | struct bio_vec *bvec = bio->bi_io_vec + bio->bi_vcnt - 1; |
46 | 46 | ||
47 | if (bio->bi_size) | ||
48 | return 1; | ||
49 | |||
50 | do { | 47 | do { |
51 | struct page *page = bvec->bv_page; | 48 | struct page *page = bvec->bv_page; |
52 | 49 | ||
@@ -62,17 +59,13 @@ static int mpage_end_io_read(struct bio *bio, unsigned int bytes_done, int err) | |||
62 | unlock_page(page); | 59 | unlock_page(page); |
63 | } while (bvec >= bio->bi_io_vec); | 60 | } while (bvec >= bio->bi_io_vec); |
64 | bio_put(bio); | 61 | bio_put(bio); |
65 | return 0; | ||
66 | } | 62 | } |
67 | 63 | ||
68 | static int mpage_end_io_write(struct bio *bio, unsigned int bytes_done, int err) | 64 | static void mpage_end_io_write(struct bio *bio, int err) |
69 | { | 65 | { |
70 | const int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags); | 66 | const int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags); |
71 | struct bio_vec *bvec = bio->bi_io_vec + bio->bi_vcnt - 1; | 67 | struct bio_vec *bvec = bio->bi_io_vec + bio->bi_vcnt - 1; |
72 | 68 | ||
73 | if (bio->bi_size) | ||
74 | return 1; | ||
75 | |||
76 | do { | 69 | do { |
77 | struct page *page = bvec->bv_page; | 70 | struct page *page = bvec->bv_page; |
78 | 71 | ||
@@ -87,7 +80,6 @@ static int mpage_end_io_write(struct bio *bio, unsigned int bytes_done, int err) | |||
87 | end_page_writeback(page); | 80 | end_page_writeback(page); |
88 | } while (bvec >= bio->bi_io_vec); | 81 | } while (bvec >= bio->bi_io_vec); |
89 | bio_put(bio); | 82 | bio_put(bio); |
90 | return 0; | ||
91 | } | 83 | } |
92 | 84 | ||
93 | static struct bio *mpage_bio_submit(int rw, struct bio *bio) | 85 | static struct bio *mpage_bio_submit(int rw, struct bio *bio) |
diff --git a/fs/ocfs2/cluster/heartbeat.c b/fs/ocfs2/cluster/heartbeat.c index 2bd7f788cf34..da2c2b442b49 100644 --- a/fs/ocfs2/cluster/heartbeat.c +++ b/fs/ocfs2/cluster/heartbeat.c | |||
@@ -217,7 +217,6 @@ static void o2hb_wait_on_io(struct o2hb_region *reg, | |||
217 | } | 217 | } |
218 | 218 | ||
219 | static int o2hb_bio_end_io(struct bio *bio, | 219 | static int o2hb_bio_end_io(struct bio *bio, |
220 | unsigned int bytes_done, | ||
221 | int error) | 220 | int error) |
222 | { | 221 | { |
223 | struct o2hb_bio_wait_ctxt *wc = bio->bi_private; | 222 | struct o2hb_bio_wait_ctxt *wc = bio->bi_private; |
@@ -227,9 +226,6 @@ static int o2hb_bio_end_io(struct bio *bio, | |||
227 | wc->wc_error = error; | 226 | wc->wc_error = error; |
228 | } | 227 | } |
229 | 228 | ||
230 | if (bio->bi_size) | ||
231 | return 1; | ||
232 | |||
233 | o2hb_bio_wait_dec(wc, 1); | 229 | o2hb_bio_wait_dec(wc, 1); |
234 | bio_put(bio); | 230 | bio_put(bio); |
235 | return 0; | 231 | return 0; |
diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c index 5f152f60d74d..3f13519436af 100644 --- a/fs/xfs/linux-2.6/xfs_aops.c +++ b/fs/xfs/linux-2.6/xfs_aops.c | |||
@@ -326,14 +326,10 @@ xfs_iomap_valid( | |||
326 | STATIC int | 326 | STATIC int |
327 | xfs_end_bio( | 327 | xfs_end_bio( |
328 | struct bio *bio, | 328 | struct bio *bio, |
329 | unsigned int bytes_done, | ||
330 | int error) | 329 | int error) |
331 | { | 330 | { |
332 | xfs_ioend_t *ioend = bio->bi_private; | 331 | xfs_ioend_t *ioend = bio->bi_private; |
333 | 332 | ||
334 | if (bio->bi_size) | ||
335 | return 1; | ||
336 | |||
337 | ASSERT(atomic_read(&bio->bi_cnt) >= 1); | 333 | ASSERT(atomic_read(&bio->bi_cnt) >= 1); |
338 | ioend->io_error = test_bit(BIO_UPTODATE, &bio->bi_flags) ? 0 : error; | 334 | ioend->io_error = test_bit(BIO_UPTODATE, &bio->bi_flags) ? 0 : error; |
339 | 335 | ||
diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c index b0f0e58866de..6a75f4d984a1 100644 --- a/fs/xfs/linux-2.6/xfs_buf.c +++ b/fs/xfs/linux-2.6/xfs_buf.c | |||
@@ -1106,16 +1106,12 @@ _xfs_buf_ioend( | |||
1106 | STATIC int | 1106 | STATIC int |
1107 | xfs_buf_bio_end_io( | 1107 | xfs_buf_bio_end_io( |
1108 | struct bio *bio, | 1108 | struct bio *bio, |
1109 | unsigned int bytes_done, | ||
1110 | int error) | 1109 | int error) |
1111 | { | 1110 | { |
1112 | xfs_buf_t *bp = (xfs_buf_t *)bio->bi_private; | 1111 | xfs_buf_t *bp = (xfs_buf_t *)bio->bi_private; |
1113 | unsigned int blocksize = bp->b_target->bt_bsize; | 1112 | unsigned int blocksize = bp->b_target->bt_bsize; |
1114 | struct bio_vec *bvec = bio->bi_io_vec + bio->bi_vcnt - 1; | 1113 | struct bio_vec *bvec = bio->bi_io_vec + bio->bi_vcnt - 1; |
1115 | 1114 | ||
1116 | if (bio->bi_size) | ||
1117 | return 1; | ||
1118 | |||
1119 | if (!test_bit(BIO_UPTODATE, &bio->bi_flags)) | 1115 | if (!test_bit(BIO_UPTODATE, &bio->bi_flags)) |
1120 | bp->b_error = EIO; | 1116 | bp->b_error = EIO; |
1121 | 1117 | ||