summaryrefslogtreecommitdiffstats
path: root/src/basic/mountpoint-util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/basic/mountpoint-util.c')
-rw-r--r--src/basic/mountpoint-util.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/basic/mountpoint-util.c b/src/basic/mountpoint-util.c
index 1e946a0bb6..48494320fd 100644
--- a/src/basic/mountpoint-util.c
+++ b/src/basic/mountpoint-util.c
@@ -378,11 +378,9 @@ int dev_is_devtmpfs(void) {
if (r < 0)
return r;
- proc_self_mountinfo = fopen("/proc/self/mountinfo", "re");
- if (!proc_self_mountinfo)
- return -errno;
-
- (void) __fsetlocking(proc_self_mountinfo, FSETLOCKING_BYCALLER);
+ r = fopen_unlocked("/proc/self/mountinfo", "re", &proc_self_mountinfo);
+ if (r < 0)
+ return r;
for (;;) {
_cleanup_free_ char *line = NULL;