From 15f3e22b00e3b25b1cf5ae031681277d46a040cd Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Thu, 19 Mar 2020 13:27:51 +0100 Subject: [PATCH] conf: flatten logic in mount_entry() Signed-off-by: Christian Brauner --- src/lxc/conf.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c index 5c280c381..066a600d6 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -1875,11 +1875,9 @@ static int mount_entry(const char *fsname, const char *target, * does not have any flags which are not already in * mountflags, then skip the remount. */ - if (!(mountflags & MS_REMOUNT)) { - if (!(required_flags & ~mountflags)) { - DEBUG("Mountflags already were %lu, skipping remount", mountflags); - goto skipremount; - } + if (!(mountflags & MS_REMOUNT) && !(required_flags & ~mountflags)) { + DEBUG("Mountflags already were %lu, skipping remount", mountflags); + goto skipremount; } mountflags |= required_flags; -- 2.47.2