Commit 78800f5
block: remove unnecessary goto labels in debugfs attribute read methods
In some debugfs attribute read methods, failure to acquire the mutex
lock results in jumping to a label before returning an error code.
However this is unnecessary, as we can return the failure code directly,
improving code readability and reducing complexity.
This commit removes the goto labels and ensures that the method returns
immediately upon failing to acquire the mutex lock.
Signed-off-by: Nilay Shroff <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>1 parent a3996d1 commit 78800f5
1 file changed
+8
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
402 | 402 | | |
403 | 403 | | |
404 | 404 | | |
405 | | - | |
| 405 | + | |
406 | 406 | | |
407 | 407 | | |
408 | 408 | | |
409 | 409 | | |
410 | | - | |
411 | | - | |
| 410 | + | |
412 | 411 | | |
413 | 412 | | |
414 | 413 | | |
| |||
419 | 418 | | |
420 | 419 | | |
421 | 420 | | |
422 | | - | |
| 421 | + | |
423 | 422 | | |
424 | 423 | | |
425 | 424 | | |
426 | 425 | | |
427 | | - | |
428 | | - | |
| 426 | + | |
429 | 427 | | |
430 | 428 | | |
431 | 429 | | |
| |||
436 | 434 | | |
437 | 435 | | |
438 | 436 | | |
439 | | - | |
| 437 | + | |
440 | 438 | | |
441 | 439 | | |
442 | 440 | | |
443 | 441 | | |
444 | | - | |
445 | | - | |
| 442 | + | |
446 | 443 | | |
447 | 444 | | |
448 | 445 | | |
| |||
453 | 450 | | |
454 | 451 | | |
455 | 452 | | |
456 | | - | |
| 453 | + | |
457 | 454 | | |
458 | 455 | | |
459 | 456 | | |
460 | 457 | | |
461 | | - | |
462 | | - | |
| 458 | + | |
463 | 459 | | |
464 | 460 | | |
465 | 461 | | |
| |||
0 commit comments