Bug 194311 - drivers/block/drbd/drbd_req.c do_submit condition fast path does not handle read as slow path
Summary: drivers/block/drbd/drbd_req.c do_submit condition fast path does not handle r...
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: drivers_other
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-07 05:59 UTC by Michael
Modified: 2017-02-07 05:59 UTC (History)
0 users

See Also:
Kernel Version: 4.10
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Michael 2017-02-07 05:59:18 UTC
In submit_fast_path:

--->	if (rw == WRITE /* rw != WRITE should not even end up 			here! */
	    && req->private_bio && req->i.size
	    && !test_bit(AL_SUSPENDED, &device->flags)) {
	
	Is there any guarantee that do_submit doesn't receive read requests? There's a simple check for it in the fast path, but nothing in the slow path, why not implement the check in the  beginning of do_submit, since we check for it anyways, and this avoids needlessly calling extra functions.

Found using static analysis tools.

Note You need to log in before you can comment on or make changes to this bug.