aboutsummaryrefslogtreecommitdiff
path: root/sys/compat/linux/linux_file.c
diff options
context:
space:
mode:
authorEdward Tomasz Napierala <trasz@FreeBSD.org>2020-01-20 12:16:32 +0000
committerEdward Tomasz Napierala <trasz@FreeBSD.org>2020-01-20 12:16:32 +0000
commit66632fe7bbe732c6fd09e391dcc16b599e1b7f67 (patch)
treef2bbefdcb2df14b15638487155b9ccc0abbd1f4e /sys/compat/linux/linux_file.c
parent6507380fb9f73b45726970c2f5942c805d222ffe (diff)
downloadsrc-66632fe7bbe732c6fd09e391dcc16b599e1b7f67.tar.gz
src-66632fe7bbe732c6fd09e391dcc16b599e1b7f67.zip
Properly translate MNT_FORCE flag to Linux umount2(2). Previously
it worked by accident. MFC after: 2 weeks Sponsored by: DARPA
Notes
Notes: svn path=/head/; revision=356912
Diffstat (limited to 'sys/compat/linux/linux_file.c')
-rw-r--r--sys/compat/linux/linux_file.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c
index 565fc562fdf8..f341e67b11e7 100644
--- a/sys/compat/linux/linux_file.c
+++ b/sys/compat/linux/linux_file.c
@@ -1078,9 +1078,14 @@ int
linux_umount(struct thread *td, struct linux_umount_args *args)
{
struct unmount_args bsd;
+ int flags;
+
+ flags = 0;
+ if ((args->flags & LINUX_MNT_FORCE) != 0)
+ flags |= MNT_FORCE;
bsd.path = args->path;
- bsd.flags = args->flags; /* XXX correct? */
+ bsd.flags = flags;
return (sys_unmount(td, &bsd));
}
#endif