hurd msync: Drop bogus test
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Tue, 31 Aug 2021 17:41:02 +0000 (19:41 +0200)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Tue, 31 Aug 2021 17:41:02 +0000 (19:41 +0200)
MS_SYNC is actually 0, so we cannot test that both MS_SYNC and MS_ASYNC
are set.

sysdeps/mach/hurd/msync.c

index a1244e42e2b994835ddca1f1fac2cd944a0b7e3e..115d30ec41d9c2f6f323c3c858bbb5407bb007b9 100644 (file)
@@ -47,9 +47,6 @@ msync (void *addr, size_t length, int flags)
   kern_return_t err;
   int cancel_oldtype;
 
-  if ((flags & (MS_SYNC | MS_ASYNC)) == (MS_SYNC | MS_ASYNC))
-    return __hurd_fail (EINVAL);
-
   while (cur < target)
     {
       vm_address_t begin = cur;