Repository navigation
Commit 19f553d
loop: Remove the unnecessary bdev checks and unused bdev variable
The lo->lo_device can't be null if the lo->lo_backing_file is set.
So let's remove the unnecessary bdev checks and the entire bdev
variable in __loop_clr_fd() since the lo->lo_backing_file is already
checked before.
Signed-off-by: Xie Yongji <xieyongji@bytedance.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20210922123711.187-4-xieyongji@bytedance.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>1 parent e515be8 commit 19f553d
1 file changed
Lines changed: 3 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1329 | 1329 | | |
1330 | 1330 | | |
1331 | 1331 | | |
1332 | | - | |
1333 | 1332 | | |
1334 | 1333 | | |
1335 | 1334 | | |
| |||
1397 | 1396 | | |
1398 | 1397 | | |
1399 | 1398 | | |
1400 | | - | |
1401 | | - | |
1402 | | - | |
1403 | | - | |
| 1399 | + | |
| 1400 | + | |
1404 | 1401 | | |
1405 | 1402 | | |
1406 | 1403 | | |
1407 | 1404 | | |
1408 | 1405 | | |
1409 | | - | |
| 1406 | + | |
1410 | 1407 | | |
1411 | 1408 | | |
1412 | 1409 | | |
| |||
0 commit comments