We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 79ebe91 commit bedf78cCopy full SHA for bedf78c
drivers/block/nbd.c
@@ -2015,12 +2015,11 @@ static int nbd_genl_disconnect(struct sk_buff *skb, struct genl_info *info)
2015
return -EINVAL;
2016
}
2017
mutex_unlock(&nbd_index_mutex);
2018
- if (!refcount_inc_not_zero(&nbd->config_refs)) {
2019
- nbd_put(nbd);
2020
- return 0;
2021
- }
+ if (!refcount_inc_not_zero(&nbd->config_refs))
+ goto put_nbd;
2022
nbd_disconnect_and_put(nbd);
2023
nbd_config_put(nbd);
+put_nbd:
2024
nbd_put(nbd);
2025
return 0;
2026
0 commit comments