diff options
author | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2020-01-20 12:16:32 +0000 |
---|---|---|
committer | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2020-01-20 12:16:32 +0000 |
commit | 66632fe7bbe732c6fd09e391dcc16b599e1b7f67 (patch) | |
tree | f2bbefdcb2df14b15638487155b9ccc0abbd1f4e /sys/compat/linux/linux_file.c | |
parent | 6507380fb9f73b45726970c2f5942c805d222ffe (diff) | |
download | src-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.c | 7 |
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 |