Add MS_NOSYMFOLLOW from Linux 5.10 to <sys/mount.h>

Message ID alpine.DEB.2.22.394.2102020007180.321382@digraph.polyomino.org.uk
State Committed
Commit 0ca21427d950755b74b8e6c3abffb01ce807d8b9
Headers
Series Add MS_NOSYMFOLLOW from Linux 5.10 to <sys/mount.h> |

Commit Message

Joseph Myers Feb. 2, 2021, 12:07 a.m. UTC
  This patch adds the new constant MS_NOSYMFOLLOW from Linux 5.10 to
<sys/mount.h>.

Tested for x86_64.
  

Comments

Dmitry V. Levin Feb. 2, 2021, 12:32 a.m. UTC | #1
On Tue, Feb 02, 2021 at 12:07:42AM +0000, Joseph Myers wrote:
> This patch adds the new constant MS_NOSYMFOLLOW from Linux 5.10 to
> <sys/mount.h>.
> 
> Tested for x86_64.

LGTM, thanks.

> diff --git a/sysdeps/unix/sysv/linux/sys/mount.h b/sysdeps/unix/sysv/linux/sys/mount.h
> index e66060ca4a..cd8af04f1d 100644
> --- a/sysdeps/unix/sysv/linux/sys/mount.h
> +++ b/sysdeps/unix/sysv/linux/sys/mount.h
> @@ -48,6 +48,8 @@ enum
>  #define MS_MANDLOCK	MS_MANDLOCK
>    MS_DIRSYNC = 128,		/* Directory modifications are synchronous.  */
>  #define MS_DIRSYNC	MS_DIRSYNC
> +  MS_NOSYMFOLLOW = 256,		/* Do not follow symlinks.  */
> +#define MS_NOSYMFOLLOW	MS_NOSYMFOLLOW
>    MS_NOATIME = 1024,		/* Do not update access times.  */
>  #define MS_NOATIME	MS_NOATIME
>    MS_NODIRATIME = 2048,		/* Do not update directory access times.  */

Just for the reference, MS_NOSYMFOLLOW was introduced by Linux kernel
commit v5.10-rc1~19^2~9.
  

Patch

diff --git a/sysdeps/unix/sysv/linux/sys/mount.h b/sysdeps/unix/sysv/linux/sys/mount.h
index e66060ca4a..cd8af04f1d 100644
--- a/sysdeps/unix/sysv/linux/sys/mount.h
+++ b/sysdeps/unix/sysv/linux/sys/mount.h
@@ -48,6 +48,8 @@  enum
 #define MS_MANDLOCK	MS_MANDLOCK
   MS_DIRSYNC = 128,		/* Directory modifications are synchronous.  */
 #define MS_DIRSYNC	MS_DIRSYNC
+  MS_NOSYMFOLLOW = 256,		/* Do not follow symlinks.  */
+#define MS_NOSYMFOLLOW	MS_NOSYMFOLLOW
   MS_NOATIME = 1024,		/* Do not update access times.  */
 #define MS_NOATIME	MS_NOATIME
   MS_NODIRATIME = 2048,		/* Do not update directory access times.  */