summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libmount/src/fs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libmount/src/fs.c b/libmount/src/fs.c
index 949e718f4..21ef0f747 100644
--- a/libmount/src/fs.c
+++ b/libmount/src/fs.c
@@ -1437,7 +1437,7 @@ int mnt_fs_match_target(struct libmnt_fs *fs, const char *target,
rc = (cn && mnt_fs_streq_target(fs, cn));
/* 3) - canonicalized and canonicalized */
- if (!rc && cn && !mnt_fs_is_kernel(fs)) {
+ if (!rc && cn && !mnt_fs_is_kernel(fs) && !mnt_fs_is_swaparea(fs)) {
char *tcn = mnt_resolve_path(fs->target, cache);
rc = (tcn && strcmp(cn, tcn) == 0);
}