]> git.proxmox.com Git - mirror_lxc.git/commitdiff
conf: flatten logic in mount_entry()
authorChristian Brauner <christian.brauner@ubuntu.com>
Thu, 19 Mar 2020 12:27:51 +0000 (13:27 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Thu, 19 Mar 2020 12:46:16 +0000 (13:46 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/conf.c

index 5c280c3815b1c9bd869a371ff94e16532b354118..066a600d66929798ff99842aa36296d803616724 100644 (file)
@@ -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;