Subject: stop checking ancient kernel version for NFS mount From: Michael Tokarev Bug-Debian: https://bugs.debian.org/684611 Forwarded: no The nfs mount code checks for ancient kernel 2.2.18 (!) to determine which mount protocol to use (v3 or v4). Stop doing this, and always use v4. This is the only place in debian busybox which uses get_linux_version_code() function which can't deal with less-than-3-component kernel version numbers (#684611). (Other places are in modutils/ to determine whenever to use pre-2.4 module loading way, which is disabled in debian build). This is a band-aid patch, to minimize changes, more complete cleanup is needed for all this code upstream. --- a/util-linux/mount.c +++ b/util-linux/mount.c @@ -459,9 +459,6 @@ struct globals { -#if ENABLE_FEATURE_MOUNT_NFS - smalluint nfs_mount_version; -#endif #if ENABLE_FEATURE_MOUNT_VERBOSE unsigned verbose; #endif @@ -470,7 +467,7 @@ } FIX_ALIASING; enum { GETMNTENT_BUFSIZE = COMMON_BUFSIZE - offsetof(struct globals, getmntent_buf) }; #define G (*(struct globals*)bb_common_bufsiz1) -#define nfs_mount_version (G.nfs_mount_version) +#define nfs_mount_version 4 /* assume kernel>= 2.4, use v4 nfs mount protocol */ #if ENABLE_FEATURE_MOUNT_VERBOSE #define verbose (G.verbose ) #else @@ -1133,6 +1130,7 @@ static void find_kernel_nfs_mount_version(void) { +#if 0 int kernel_version; if (nfs_mount_version) @@ -1146,6 +1144,7 @@ nfs_mount_version = 3; /* else v4 since 2.3.99pre4 */ } +#endif } static void