summaryrefslogtreecommitdiffstats
path: root/libmount/src/context_umount.c
diff options
context:
space:
mode:
Diffstat (limited to 'libmount/src/context_umount.c')
-rw-r--r--libmount/src/context_umount.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libmount/src/context_umount.c b/libmount/src/context_umount.c
index 39d940f6c..2c2975e7e 100644
--- a/libmount/src/context_umount.c
+++ b/libmount/src/context_umount.c
@@ -64,7 +64,7 @@ static int lookup_umount_fs(struct libmnt_context *cxt)
try_loopdev:
fs = mnt_table_find_target(mtab, tgt, MNT_ITER_BACKWARD);
- if (!fs) {
+ if (!fs && mnt_context_is_swapmatch(cxt)) {
/* maybe the option is source rather than target (mountpoint) */
fs = mnt_table_find_source(mtab, tgt, MNT_ITER_BACKWARD);