Commit 01d86f02 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] kill submit_{bh,bio} return value

From: Jeff Garzik <jgarzik@pobox.com>

Nobody ever checks the return value of submit_bh(), and submit_bh() is the
only caller that checks the submit_bio() return value.

This changes the kernel I/O submission path -- a fast path -- so this
cleanup is also a microoptimization.
parent cba16655
...@@ -2429,7 +2429,7 @@ EXPORT_SYMBOL(generic_make_request); ...@@ -2429,7 +2429,7 @@ EXPORT_SYMBOL(generic_make_request);
* interfaces, @bio must be presetup and ready for I/O. * interfaces, @bio must be presetup and ready for I/O.
* *
*/ */
int submit_bio(int rw, struct bio *bio) void submit_bio(int rw, struct bio *bio)
{ {
int count = bio_sectors(bio); int count = bio_sectors(bio);
...@@ -2451,7 +2451,6 @@ int submit_bio(int rw, struct bio *bio) ...@@ -2451,7 +2451,6 @@ int submit_bio(int rw, struct bio *bio)
} }
generic_make_request(bio); generic_make_request(bio);
return 1;
} }
EXPORT_SYMBOL(submit_bio); EXPORT_SYMBOL(submit_bio);
......
...@@ -2684,7 +2684,7 @@ static int end_bio_bh_io_sync(struct bio *bio, unsigned int bytes_done, int err) ...@@ -2684,7 +2684,7 @@ static int end_bio_bh_io_sync(struct bio *bio, unsigned int bytes_done, int err)
return 0; return 0;
} }
int submit_bh(int rw, struct buffer_head * bh) void submit_bh(int rw, struct buffer_head * bh)
{ {
struct bio *bio; struct bio *bio;
...@@ -2722,7 +2722,7 @@ int submit_bh(int rw, struct buffer_head * bh) ...@@ -2722,7 +2722,7 @@ int submit_bh(int rw, struct buffer_head * bh)
bio->bi_end_io = end_bio_bh_io_sync; bio->bi_end_io = end_bio_bh_io_sync;
bio->bi_private = bh; bio->bi_private = bh;
return submit_bio(rw, bio); submit_bio(rw, bio);
} }
/** /**
......
...@@ -177,7 +177,7 @@ void free_buffer_head(struct buffer_head * bh); ...@@ -177,7 +177,7 @@ void free_buffer_head(struct buffer_head * bh);
void FASTCALL(unlock_buffer(struct buffer_head *bh)); void FASTCALL(unlock_buffer(struct buffer_head *bh));
void ll_rw_block(int, int, struct buffer_head * bh[]); void ll_rw_block(int, int, struct buffer_head * bh[]);
void sync_dirty_buffer(struct buffer_head *bh); void sync_dirty_buffer(struct buffer_head *bh);
int submit_bh(int, struct buffer_head *); void submit_bh(int, struct buffer_head *);
void write_boundary_block(struct block_device *bdev, void write_boundary_block(struct block_device *bdev,
sector_t bblock, unsigned blocksize); sector_t bblock, unsigned blocksize);
......
...@@ -1359,7 +1359,7 @@ extern struct file * get_empty_filp(void); ...@@ -1359,7 +1359,7 @@ extern struct file * get_empty_filp(void);
extern void file_move(struct file *f, struct list_head *list); extern void file_move(struct file *f, struct list_head *list);
extern void file_kill(struct file *f); extern void file_kill(struct file *f);
struct bio; struct bio;
extern int submit_bio(int, struct bio *); extern void submit_bio(int, struct bio *);
extern int bdev_read_only(struct block_device *); extern int bdev_read_only(struct block_device *);
extern int set_blocksize(struct block_device *, int); extern int set_blocksize(struct block_device *, int);
extern int sb_set_blocksize(struct super_block *, int); extern int sb_set_blocksize(struct super_block *, int);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment