summaryrefslogtreecommitdiffstats
path: root/sys-utils/fstrim.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys-utils/fstrim.c')
-rw-r--r--sys-utils/fstrim.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/sys-utils/fstrim.c b/sys-utils/fstrim.c
index e92a822f0..f252edba0 100644
--- a/sys-utils/fstrim.c
+++ b/sys-utils/fstrim.c
@@ -158,23 +158,11 @@ static int uniq_fs_source_cmp(
struct libmnt_fs *a,
struct libmnt_fs *b)
{
- int eq;
-
if (mnt_fs_is_pseudofs(a) || mnt_fs_is_netfs(a) ||
mnt_fs_is_pseudofs(b) || mnt_fs_is_netfs(b))
return 1;
- eq = mnt_fs_streq_srcpath(a, mnt_fs_get_srcpath(b));
- if (eq) {
- const char *aroot = mnt_fs_get_root(a),
- *broot = mnt_fs_get_root(b);
- if (!aroot || !broot)
- eq = 0;
- else if (strcmp(aroot, broot) != 0)
- eq = 0;
- }
-
- return !eq;
+ return !mnt_fs_streq_srcpath(a, mnt_fs_get_srcpath(b));
}
/*