[PATCH] block: don't call should_fail_request() for !CONFIG_FAIL_MAKE_REQUEST

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Unnecessary function call, if we don't have that specific configuration
option enabled.

Signed-off-by: Jens Axboe <axboe@xxxxxxxxx>

---

diff --git a/block/blk-core.c b/block/blk-core.c
index 5454db2fa263..a267f11f55cb 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -697,8 +697,10 @@ static inline bool bio_check_ro(struct bio *bio)
 
 static noinline int should_fail_bio(struct bio *bio)
 {
+#ifdef CONFIG_FAIL_MAKE_REQUEST
 	if (should_fail_request(bdev_whole(bio->bi_bdev), bio->bi_iter.bi_size))
 		return -EIO;
+#endif
 	return 0;
 }
 ALLOW_ERROR_INJECTION(should_fail_bio, ERRNO);

-- 
Jens Axboe




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux