1
From 948aa0ff1f7c698bf0735afd3b38c2c29e5605b8 Mon Sep 17 00:00:00 2001
2
From: Dmitrijs Ledkovs <dmitrijs.ledkovs@canonical.com>
3
Date: Fri, 22 Jun 2012 18:02:09 +0100
4
Subject: [PATCH] Remove kernel & mount.nfs version checks on Debian/Ubuntu.
7
Bug-Debian: http://bugs.debian.org/678555
8
Bug-Ubuntu: http://pad.lv/1016673
10
daemon/automount.c | 7 -------
11
include/mounts.h | 2 --
12
modules/replicated.c | 5 ++---
13
3 files changed, 2 insertions(+), 12 deletions(-)
15
diff --git a/daemon/automount.c b/daemon/automount.c
16
index 7dea73b..591ad04 100644
17
--- a/daemon/automount.c
18
+++ b/daemon/automount.c
19
@@ -51,9 +51,6 @@ const char *libdir = AUTOFS_LIB_DIR; /* Location of library modules */
20
const char *mapdir = AUTOFS_MAP_DIR; /* Location of mount maps */
21
const char *confdir = AUTOFS_CONF_DIR; /* Location of autofs config file */
23
-unsigned int nfs_mount_uses_string_options = 0;
24
-static struct nfs_mount_vers vers, check = {1, 1, 1};
26
/* autofs fifo name prefix */
27
const char *fifodir = AUTOFS_FIFO_DIR "/autofs.fifo";
29
@@ -1281,8 +1278,6 @@ static int do_hup_signal(struct master *master, time_t age)
33
- nfs_mount_uses_string_options = check_nfs_mount_version(&vers, &check);
36
if (master->reading) {
37
status = pthread_mutex_unlock(&mrc.mutex);
38
@@ -1946,8 +1941,6 @@ int main(int argc, char *argv[])
40
defaults_read_config(0);
42
- nfs_mount_uses_string_options = check_nfs_mount_version(&vers, &check);
44
kpkt_len = get_kpkt_len();
45
timeout = defaults_get_timeout();
46
ghost = defaults_get_browse_mode();
47
diff --git a/include/mounts.h b/include/mounts.h
48
index 1efce64..ba75973 100644
49
--- a/include/mounts.h
50
+++ b/include/mounts.h
51
@@ -82,8 +82,6 @@ struct nfs_mount_vers {
54
unsigned int linux_version_code(void);
55
-int check_nfs_mount_version(struct nfs_mount_vers *, struct nfs_mount_vers *);
56
-extern unsigned int nfs_mount_uses_string_options;
58
unsigned int query_kproto_ver(void);
59
unsigned int get_kver_major(void);
60
diff --git a/modules/replicated.c b/modules/replicated.c
61
index 10e1429..049fabd 100644
62
--- a/modules/replicated.c
63
+++ b/modules/replicated.c
64
@@ -964,9 +964,8 @@ int prune_host_list(unsigned logopt, struct host **list,
65
* But also allow the MOUNT_WAIT configuration parameter to override
68
- if (nfs_mount_uses_string_options &&
69
- defaults_get_mount_wait() == -1 &&
70
- (kern_vers = linux_version_code()) > KERNEL_VERSION(2, 6, 22)) {
72
+ if (defaults_get_mount_wait() == -1) {