summaryrefslogtreecommitdiff
path: root/i386/i386at
diff options
context:
space:
mode:
Diffstat (limited to 'i386/i386at')
-rw-r--r--i386/i386at/gpl/linux/include/linux/blk.h28
-rw-r--r--i386/i386at/gpl/linux/include/linux/fs.h22
2 files changed, 6 insertions, 44 deletions
diff --git a/i386/i386at/gpl/linux/include/linux/blk.h b/i386/i386at/gpl/linux/include/linux/blk.h
index d7801dd..cf236a6 100644
--- a/i386/i386at/gpl/linux/include/linux/blk.h
+++ b/i386/i386at/gpl/linux/include/linux/blk.h
@@ -349,18 +349,19 @@ static void end_request(int uptodate) {
#endif /* IDE_DRIVER */
struct buffer_head * bh;
+ req->errors = 0;
if (!uptodate) {
printk("end_request: I/O error, dev %s, sector %lu\n",
kdevname(req->rq_dev), req->sector);
#ifdef MACH
- req->errors = 1;
- while (req->bh) {
- bh = req->bh;
- req->bh = bh->b_reqnext;
+ for (bh = req->bh; bh; ) {
+ struct buffer_head *next = bh->b_reqnext;
+ bh->b_reqnext = NULL;
mark_buffer_uptodate(bh, 0);
unlock_buffer(bh);
+ bh = next;
}
- goto done;
+ req->bh = NULL;
#else
req->nr_sectors--;
req->nr_sectors &= ~SECTOR_MASK;
@@ -384,11 +385,6 @@ static void end_request(int uptodate) {
return;
}
}
-#ifdef MACH
- req->errors = 0;
-
-done:
-#endif
#ifndef DEVICE_NO_RANDOM
add_blkdev_randomness(MAJOR(req->rq_dev));
#endif
@@ -402,19 +398,7 @@ done:
if (req->sem != NULL)
up(req->sem);
req->rq_status = RQ_INACTIVE;
-#ifndef MACH
wake_up(&wait_for_request);
-#endif
-#ifdef MACH
- {
- unsigned long flags;
-
- save_flags(flags);
- cli();
- (*blk_dev[MAJOR(req->rq_dev)].request_fn)();
- restore_flags(flags);
- }
-#endif
}
#endif /* defined(IDE_DRIVER) && !defined(_IDE_C) */
#endif /* ! SCSI_MAJOR(MAJOR_NR) */
diff --git a/i386/i386at/gpl/linux/include/linux/fs.h b/i386/i386at/gpl/linux/include/linux/fs.h
index d5bc62b..278aa36 100644
--- a/i386/i386at/gpl/linux/include/linux/fs.h
+++ b/i386/i386at/gpl/linux/include/linux/fs.h
@@ -150,24 +150,6 @@ typedef char buffer_block[BLOCK_SIZE];
* The second 16 bytes we use for lru buffer scans, as used by
* sync_buffers() and refill_freelist(). -- sct
*/
-#ifdef MACH
-struct buffer_head
-{
- unsigned long b_blocknr;
- kdev_t b_dev;
- unsigned long b_state;
- unsigned long b_size;
- char *b_data;
- struct wait_queue *b_wait;
- struct buffer_head *b_reqnext;
- void *b_page_list;
- int b_index;
- int b_off;
- int b_usrcnt;
- struct request *b_request;
- struct semaphore *b_sem;
-};
-#else /* ! MACH */
struct buffer_head {
/* First cache line: */
unsigned long b_blocknr; /* block number */
@@ -192,11 +174,7 @@ struct buffer_head {
struct buffer_head * b_prev; /* doubly linked list of hash-queue */
struct buffer_head * b_prev_free; /* doubly linked list of buffers */
struct buffer_head * b_reqnext; /* request queue */
- char *b_usrbuf;
- struct request *b_request;
- struct semaphore *b_sem;
};
-#endif /* ! MACH */
static inline int buffer_uptodate(struct buffer_head * bh)
{