diff -urN 2.3.48pre1/drivers/block/ll_rw_blk.c lvm/drivers/block/ll_rw_blk.c --- 2.3.48pre1/drivers/block/ll_rw_blk.c Thu Feb 24 04:02:38 2000 +++ lvm/drivers/block/ll_rw_blk.c Thu Feb 24 18:11:10 2000 @@ -952,15 +952,6 @@ bh->b_end_io(bh, test_bit(BH_Uptodate, &bh->b_state)); } -static inline void buffer_IO_error(struct buffer_head * bh) -{ - mark_buffer_clean(bh); - /* - * b_end_io has to clear the BH_Uptodate bitflag in the error case! - */ - bh->b_end_io(bh, 0); -} - int generic_make_request (request_queue_t *q, int rw, struct buffer_head * bh) { unsigned long flags; @@ -1061,7 +1052,8 @@ bh->b_rdev = bh->b_dev; bh->b_rsector = bh->b_blocknr * (bh->b_size>>9); - generic_make_request(q, rw, bh); + if (generic_make_request(q, rw, bh) < 0) + buffer_IO_error(bh); } return; diff -urN 2.3.48pre1/include/linux/fs.h lvm/include/linux/fs.h --- 2.3.48pre1/include/linux/fs.h Thu Feb 24 04:02:39 2000 +++ lvm/include/linux/fs.h Thu Feb 24 18:10:05 2000 @@ -882,6 +882,15 @@ #define atomic_set_buffer_dirty(bh) test_and_set_bit(BH_Dirty, &(bh)->b_state) +static inline void buffer_IO_error(struct buffer_head * bh) +{ + mark_buffer_clean(bh); + /* + * b_end_io has to clear the BH_Uptodate bitflag in the error case! + */ + bh->b_end_io(bh, 0); +} + extern void balance_dirty(kdev_t); extern int check_disk_change(kdev_t); extern int invalidate_inodes(struct super_block *);