summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Tokarev <mjt@tls.msk.ru>2022-09-02 17:10:44 +0200
committerPhilip Hands <phil@hands.com>2022-09-02 17:10:44 +0200
commit231c39075070d95514b9ccd1ee074ef61cee1a79 (patch)
tree09b60aedd9f37652c7bed661bbbe52cf9cfbaa63
parentd672260c13e7ca452b522357fa52075f98d14d1e (diff)
stop checking ancient kernel version for NFS mount
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. Gbp-Pq: Name stop-checking-ancient-kernel-version.patch
-rw-r--r--util-linux/mount.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/util-linux/mount.c b/util-linux/mount.c
index 4e65b6b46..d6b1c2b9c 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -459,9 +459,6 @@ static const char mount_option_str[] ALIGN1 =
struct globals {
-#if ENABLE_FEATURE_MOUNT_NFS
- smalluint nfs_mount_version;
-#endif
#if ENABLE_FEATURE_MOUNT_VERBOSE
unsigned verbose;
#endif
@@ -470,7 +467,7 @@ struct globals {
} 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 bool_t xdr_mountres3(XDR *xdrs, mountres3 *objp)
static void
find_kernel_nfs_mount_version(void)
{
+#if 0
int kernel_version;
if (nfs_mount_version)
@@ -1146,6 +1144,7 @@ find_kernel_nfs_mount_version(void)
nfs_mount_version = 3;
/* else v4 since 2.3.99pre4 */
}
+#endif
}
static void