mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
cov: validata top_lv
Add explicit pointer check is never NULL.
This commit is contained in:
parent
fae0ed8f10
commit
242bf56413
@ -5951,6 +5951,11 @@ static void _setup_params_for_extend_metadata(struct logical_volume *lv,
|
|||||||
|
|
||||||
static int _lv_resize_check_used(struct logical_volume *lv)
|
static int _lv_resize_check_used(struct logical_volume *lv)
|
||||||
{
|
{
|
||||||
|
if (!lv) {
|
||||||
|
log_error(INTERNAL_ERROR "LV is not specified.");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (lv_is_locked(lv)) {
|
if (lv_is_locked(lv)) {
|
||||||
log_error("Can't resize locked logical volume %s.", display_lvname(lv));
|
log_error("Can't resize locked logical volume %s.", display_lvname(lv));
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user