Commit c5391c0
dm-crypt: Use up_read() together with key_put() only once in crypt_set_keyring_key()
The combination of the calls “up_read(&key->sem)” and “key_put(key)”
was immediately used after a return code check for a set_key() call
in this function implementation.
Thus use such a function call pair only once instead directly
before the check.
This issue was transformed by using the Coccinelle software.
Signed-off-by: Markus Elfring <[email protected]>
Signed-off-by: Mikulas Patocka <[email protected]>1 parent c8691cd commit c5391c0
1 file changed
+2
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2621 | 2621 | | |
2622 | 2622 | | |
2623 | 2623 | | |
| 2624 | + | |
| 2625 | + | |
2624 | 2626 | | |
2625 | | - | |
2626 | | - | |
2627 | 2627 | | |
2628 | 2628 | | |
2629 | 2629 | | |
2630 | 2630 | | |
2631 | | - | |
2632 | | - | |
2633 | | - | |
2634 | 2631 | | |
2635 | 2632 | | |
2636 | 2633 | | |
| |||
0 commit comments