Commit a949a81
ublk: remove ubq checks from ublk_{get,put}_req_ref()
ublk_get_req_ref() and ublk_put_req_ref() currently call
ublk_need_req_ref(ubq) to check whether the ublk device features require
reference counting of its requests. However, all callers already know
that reference counting is required:
- __ublk_check_and_get_req() is only called from
ublk_check_and_get_req() if user copy is enabled, and from
ublk_register_io_buf() if zero copy is enabled
- ublk_io_release() is only called for requests registered by
ublk_register_io_buf(), which requires zero copy
- ublk_ch_read_iter() and ublk_ch_write_iter() only call
ublk_put_req_ref() if ublk_check_and_get_req() succeeded, which
requires user copy to be enabled
So drop the ublk_need_req_ref() check and the ubq argument in
ublk_get_req_ref() and ublk_put_req_ref().
Signed-off-by: Caleb Sander Mateos <[email protected]>1 parent 73e4593 commit a949a81
1 file changed
+13
-28
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
692 | 692 | | |
693 | 693 | | |
694 | 694 | | |
695 | | - | |
696 | | - | |
| 695 | + | |
697 | 696 | | |
698 | | - | |
699 | | - | |
700 | | - | |
701 | | - | |
702 | | - | |
| 697 | + | |
703 | 698 | | |
704 | | - | |
| 699 | + | |
705 | 700 | | |
706 | 701 | | |
707 | | - | |
708 | | - | |
| 702 | + | |
709 | 703 | | |
710 | | - | |
711 | | - | |
| 704 | + | |
712 | 705 | | |
713 | | - | |
714 | | - | |
715 | | - | |
| 706 | + | |
716 | 707 | | |
717 | | - | |
718 | 708 | | |
719 | 709 | | |
720 | 710 | | |
| |||
2006 | 1996 | | |
2007 | 1997 | | |
2008 | 1998 | | |
2009 | | - | |
2010 | 1999 | | |
2011 | | - | |
| 2000 | + | |
2012 | 2001 | | |
2013 | 2002 | | |
2014 | 2003 | | |
| |||
2029 | 2018 | | |
2030 | 2019 | | |
2031 | 2020 | | |
2032 | | - | |
| 2021 | + | |
2033 | 2022 | | |
2034 | 2023 | | |
2035 | 2024 | | |
| |||
2305 | 2294 | | |
2306 | 2295 | | |
2307 | 2296 | | |
2308 | | - | |
| 2297 | + | |
2309 | 2298 | | |
2310 | 2299 | | |
2311 | 2300 | | |
| |||
2319 | 2308 | | |
2320 | 2309 | | |
2321 | 2310 | | |
2322 | | - | |
| 2311 | + | |
2323 | 2312 | | |
2324 | 2313 | | |
2325 | 2314 | | |
| |||
2433 | 2422 | | |
2434 | 2423 | | |
2435 | 2424 | | |
2436 | | - | |
| 2425 | + | |
2437 | 2426 | | |
2438 | 2427 | | |
2439 | 2428 | | |
2440 | 2429 | | |
2441 | 2430 | | |
2442 | | - | |
2443 | 2431 | | |
2444 | 2432 | | |
2445 | 2433 | | |
| |||
2449 | 2437 | | |
2450 | 2438 | | |
2451 | 2439 | | |
2452 | | - | |
2453 | | - | |
| 2440 | + | |
2454 | 2441 | | |
2455 | 2442 | | |
2456 | 2443 | | |
2457 | 2444 | | |
2458 | 2445 | | |
2459 | 2446 | | |
2460 | | - | |
2461 | 2447 | | |
2462 | 2448 | | |
2463 | 2449 | | |
| |||
2467 | 2453 | | |
2468 | 2454 | | |
2469 | 2455 | | |
2470 | | - | |
2471 | | - | |
| 2456 | + | |
2472 | 2457 | | |
2473 | 2458 | | |
2474 | 2459 | | |
| |||
0 commit comments