Commit 02b67161 authored by Pavel Emelyanov's avatar Pavel Emelyanov

mount: Move some checks in mounts_sb_equal

travis-ci: success for mount: Sanitize sb comparison code
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 2bc324f5
...@@ -294,6 +294,12 @@ static bool mounts_sb_equal(struct mount_info *a, struct mount_info *b) ...@@ -294,6 +294,12 @@ static bool mounts_sb_equal(struct mount_info *a, struct mount_info *b)
if (a->fstype != b->fstype) if (a->fstype != b->fstype)
return false; return false;
if (a->s_dev != b->s_dev)
return false;
if (strcmp(a->source, b->source) != 0)
return false;
/* There is a btrfs bug where it doesn't emit subvol= correctly when /* There is a btrfs bug where it doesn't emit subvol= correctly when
* files are bind mounted, so let's ignore it for now. * files are bind mounted, so let's ignore it for now.
* https://marc.info/?l=linux-btrfs&m=145857372803614&w=2 * https://marc.info/?l=linux-btrfs&m=145857372803614&w=2
...@@ -332,7 +338,7 @@ static bool mounts_sb_equal(struct mount_info *a, struct mount_info *b) ...@@ -332,7 +338,7 @@ static bool mounts_sb_equal(struct mount_info *a, struct mount_info *b)
strcmp(a->private, b->private)) strcmp(a->private, b->private))
return false; return false;
return a->s_dev == b->s_dev && !strcmp(a->source, b->source); return true;
} }
/* /*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment