diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2019-11-14 18:01:05 +0100 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2019-11-14 18:06:42 +0100 |
commit | 61a483a654d87fc514dd4e7570467797247b6031 (patch) | |
tree | d4ee90fccb1620712e2fb3e6c87c05eb4f3d9c6d | |
parent | c38be0653111e3d63efbbf2f8914c83f15a73e70 (diff) | |
download | lvm2-61a483a654d87fc514dd4e7570467797247b6031.tar.gz |
hints: check for _touch_hints
Exit when !_touch_hints().
-rw-r--r-- | lib/label/hints.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/label/hints.c b/lib/label/hints.c index 8739f337d..c6039d555 100644 --- a/lib/label/hints.c +++ b/lib/label/hints.c @@ -1261,8 +1261,9 @@ int get_hints(struct cmd_context *cmd, struct dm_list *hints_out, int *newhints, */ if (_newhints_exists()) { log_debug("get_hints: newhints file"); - if (!_hints_exists()) - _touch_hints(); + if (!_hints_exists() && !_touch_hints()) + return 0; + if (!_lock_hints(cmd, LOCK_EX, NONBLOCK)) return 0; /* create new hints after scan */ |