diff options
-rw-r--r-- | fs/nfs/client.c | 10 | ||||
-rw-r--r-- | include/linux/nfs_fs_sb.h | 7 |
2 files changed, 17 insertions, 0 deletions
diff --git a/fs/nfs/client.c b/fs/nfs/client.c index 874018113d0e..93dfd75aba7c 100644 --- a/fs/nfs/client.c +++ b/fs/nfs/client.c | |||
@@ -688,6 +688,16 @@ static int nfs_init_server(struct nfs_server *server, | |||
688 | if (error < 0) | 688 | if (error < 0) |
689 | goto error; | 689 | goto error; |
690 | 690 | ||
691 | /* Preserve the values of mount_server-related mount options */ | ||
692 | if (data->mount_server.addrlen) { | ||
693 | memcpy(&server->mountd_address, &data->mount_server.address, | ||
694 | data->mount_server.addrlen); | ||
695 | server->mountd_addrlen = data->mount_server.addrlen; | ||
696 | } | ||
697 | server->mountd_version = data->mount_server.version; | ||
698 | server->mountd_port = data->mount_server.port; | ||
699 | server->mountd_protocol = data->mount_server.protocol; | ||
700 | |||
691 | server->namelen = data->namlen; | 701 | server->namelen = data->namlen; |
692 | /* Create a client RPC handle for the NFSv3 ACL management interface */ | 702 | /* Create a client RPC handle for the NFSv3 ACL management interface */ |
693 | nfs_init_server_aclclient(server); | 703 | nfs_init_server_aclclient(server); |
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h index 670e5c7222d0..ac7e4fb943ea 100644 --- a/include/linux/nfs_fs_sb.h +++ b/include/linux/nfs_fs_sb.h | |||
@@ -118,6 +118,13 @@ struct nfs_server { | |||
118 | 118 | ||
119 | atomic_t active; /* Keep trace of any activity to this server */ | 119 | atomic_t active; /* Keep trace of any activity to this server */ |
120 | wait_queue_head_t active_wq; /* Wait for any activity to stop */ | 120 | wait_queue_head_t active_wq; /* Wait for any activity to stop */ |
121 | |||
122 | /* mountd-related mount options */ | ||
123 | struct sockaddr_storage mountd_address; | ||
124 | size_t mountd_addrlen; | ||
125 | u32 mountd_version; | ||
126 | unsigned short mountd_port; | ||
127 | unsigned short mountd_protocol; | ||
121 | }; | 128 | }; |
122 | 129 | ||
123 | /* Server capabilities */ | 130 | /* Server capabilities */ |