Properly translate MNT_FORCE flag to Linux umount2(2). Previously
it worked by accident. MFC after: 2 weeks Sponsored by: DARPA
This commit is contained in:
parent
6507380fb9
commit
66632fe7bb
sys/compat/linux
@ -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
|
||||
|
@ -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
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user