diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index 565fc562fdf..f341e67b11e 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 diff --git a/sys/compat/linux/linux_file.h b/sys/compat/linux/linux_file.h index 40384c52a06..574feec3f26 100644 --- a/sys/compat/linux/linux_file.h +++ b/sys/compat/linux/linux_file.h @@ -56,6 +56,11 @@ #define LINUX_MS_NOEXEC 0x0008 #define LINUX_MS_REMOUNT 0x0020 +/* + * umount2 flags + */ +#define LINUX_MNT_FORCE 0x0001 + /* * common open/fcntl flags */