linux: Remove assembly umount2 implementation
Commit Message
Only alpha and ia64 do not support __NR_umount2 (defined as
__NR_umount), but recent kernel fixes (74cd2184833f for ia64, and
12b57c5c70f39 for alpha) add the required alias.
Checked with a build against all affected ABIs.
---
sysdeps/unix/sysv/linux/Makefile | 2 +-
sysdeps/unix/sysv/linux/ia64/syscalls.list | 2 --
sysdeps/unix/sysv/linux/umount.c | 13 +++++++++----
sysdeps/unix/sysv/linux/umount2.S | 13 -------------
4 files changed, 10 insertions(+), 20 deletions(-)
delete mode 100644 sysdeps/unix/sysv/linux/umount2.S
Comments
* Adhemerval Zanella via Libc-alpha:
> Only alpha and ia64 do not support __NR_umount2 (defined as
> __NR_umount), but recent kernel fixes (74cd2184833f for ia64, and
> 12b57c5c70f39 for alpha) add the required alias.
Shouldn't this be in a separate umount2.c file, based on the existing
conventions?
Thanks,
Florian
On 08/05/2020 11:48, Florian Weimer wrote:
> * Adhemerval Zanella via Libc-alpha:
>
>> Only alpha and ia64 do not support __NR_umount2 (defined as
>> __NR_umount), but recent kernel fixes (74cd2184833f for ia64, and
>> 12b57c5c70f39 for alpha) add the required alias.
>
> Shouldn't this be in a separate umount2.c file, based on the existing
> conventions?
>
I don't have a strong opinion here. I added in the umount implementation
just to avoid add a hidden_def/hidden_proto and a new file.
* Adhemerval Zanella:
> On 08/05/2020 11:48, Florian Weimer wrote:
>> * Adhemerval Zanella via Libc-alpha:
>>
>>> Only alpha and ia64 do not support __NR_umount2 (defined as
>>> __NR_umount), but recent kernel fixes (74cd2184833f for ia64, and
>>> 12b57c5c70f39 for alpha) add the required alias.
>>
>> Shouldn't this be in a separate umount2.c file, based on the existing
>> conventions?
>>
>
> I don't have a strong opinion here. I added in the umount implementation
> just to avoid add a hidden_def/hidden_proto and a new file.
Please keep it in a separate file, then, for consistency. Sorry about
the extra work. 8-/
Thanks,
Florian
@@ -54,7 +54,7 @@ CFLAGS-malloc.c += -DMORECORE_CLEARS=2
endif
ifeq ($(subdir),misc)
-sysdep_routines += adjtimex clone umount umount2 readahead sysctl \
+sysdep_routines += adjtimex clone umount readahead sysctl \
setfsuid setfsgid epoll_pwait signalfd \
eventfd eventfd_read eventfd_write prlimit \
personality epoll_wait tee vmsplice splice \
@@ -1,7 +1,5 @@
# File name Caller Syscall name # args Strong name Weak names
-umount2 - umount 2 __umount2 umount2
-
getpriority - getpriority i:ii __getpriority getpriority
# proper socket implementations:
@@ -16,12 +16,17 @@
License along with the GNU C Library. If not, see
<https://www.gnu.org/licenses/>. */
-/* Since the generic Linux syscall ABI doesn't have an oldumount system call,
- do what the kernel does down here. */
+#include <sys/mount.h>
+#include <sysdep.h>
-extern long int __umount2 (const char *name, int flags);
+int
+__umount2 (const char *special_file, int flags)
+{
+ return INLINE_SYSCALL_CALL (umount2, special_file, flags);
+}
+weak_alias (__umount2, umount2)
-long int
+int
__umount (const char *name)
{
return __umount2 (name, 0);
deleted file mode 100644
@@ -1,13 +0,0 @@
-/* umount system call with two parameters. */
-
-#include <sysdep.h>
-#if defined __NR_oldumount || defined __NR_umount2
-#ifdef __NR_oldumount
-PSEUDO (__umount2, umount, 2)
-#else
-PSEUDO (__umount2, umount2, 2)
-#endif
- ret
-PSEUDO_END(__umount2)
-weak_alias (__umount2, umount2)
-#endif