mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
use stack consistently if 0 is considered an error
This commit is contained in:
parent
2a434c479d
commit
f3f6c17250
@ -225,22 +225,18 @@ int pool_below_threshold(const struct lv_segment *pool_seg)
|
||||
DEFAULT_THIN_POOL_AUTOEXTEND_THRESHOLD);
|
||||
|
||||
/* Data */
|
||||
if (!lv_thin_pool_percent(pool_seg->lv, 0, &percent)) {
|
||||
stack;
|
||||
return 0;
|
||||
}
|
||||
if (!lv_thin_pool_percent(pool_seg->lv, 0, &percent))
|
||||
return_0;
|
||||
|
||||
if (percent >= threshold)
|
||||
return 0;
|
||||
return_0;
|
||||
|
||||
/* Metadata */
|
||||
if (!lv_thin_pool_percent(pool_seg->lv, 1, &percent)) {
|
||||
stack;
|
||||
return 0;
|
||||
}
|
||||
if (!lv_thin_pool_percent(pool_seg->lv, 1, &percent))
|
||||
return_0;
|
||||
|
||||
if (percent >= threshold)
|
||||
return 0;
|
||||
return_0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user