aboutsummaryrefslogtreecommitdiffstats
path: root/libmount/src/context_umount.c
diff options
context:
space:
mode:
authorKarel Zak <kzak@redhat.com>2025-07-16 13:52:07 +0200
committerKarel Zak <kzak@redhat.com>2025-08-06 15:03:29 +0200
commit8c76b852717fc35fc07b4805239cf7b51f3d39d9 (patch)
tree9655e63d63793e54d04053f9001c0b208b231a55 /libmount/src/context_umount.c
parentf9c62adb72da799d230acdfce1fd5369e127c68f (diff)
downloadutil-linux-8c76b852717fc35fc07b4805239cf7b51f3d39d9.tar.gz
libmount: add mnt_fs_is_{moved,attached,detached} functions
Let's use these simple functions to report what the last operation or status detected by the library means to the filesystem. It will be used by the fanotify monitor as well. Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/src/context_umount.c')
-rw-r--r--libmount/src/context_umount.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libmount/src/context_umount.c b/libmount/src/context_umount.c
index 27319f77cf..8fbd662ab4 100644
--- a/libmount/src/context_umount.c
+++ b/libmount/src/context_umount.c
@@ -934,6 +934,7 @@ static int do_umount(struct libmnt_context *cxt)
}
cxt->syscall_status = 0;
DBG(CXT, ul_debugobj(cxt, "read-only re-mount(2) success"));
+ mnt_fs_mark_attached(cxt->fs);
return 0;
}
@@ -944,6 +945,7 @@ static int do_umount(struct libmnt_context *cxt)
}
cxt->syscall_status = 0;
+ mnt_fs_mark_detached(cxt->fs);
DBG(CXT, ul_debugobj(cxt, "umount(2) success"));
return 0;
}