Commit 76ee7fd
f2fs: ignore discard return value
__blkdev_issue_discard() always returns 0, making the error assignment
in __submit_discard_cmd() dead code.
Initialize err to 0 and remove the error assignment from the
__blkdev_issue_discard() call to err. Move fault injection code into
already present if branch where err is set to -EIO.
This preserves the fault injection behavior while removing dead error
handling.
Reviewed-by: Martin K. Petersen <[email protected]>
Reviewed-by: Johannes Thumshirn <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Reviewed-by: Chao Yu <[email protected]>
Signed-off-by: Chaitanya Kulkarni <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>1 parent 8d1cb17 commit 76ee7fd
1 file changed
+3
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1343 | 1343 | | |
1344 | 1344 | | |
1345 | 1345 | | |
| 1346 | + | |
1346 | 1347 | | |
1347 | 1348 | | |
1348 | | - | |
1349 | | - | |
1350 | | - | |
1351 | | - | |
1352 | | - | |
1353 | | - | |
1354 | | - | |
1355 | 1349 | | |
1356 | 1350 | | |
1357 | 1351 | | |
| |||
1360 | 1354 | | |
1361 | 1355 | | |
1362 | 1356 | | |
| 1357 | + | |
| 1358 | + | |
1363 | 1359 | | |
1364 | 1360 | | |
1365 | 1361 | | |
| |||
0 commit comments