diff options
author | Stanislav Kinsbursky <skinsbursky@parallels.com> | 2012-01-10 07:12:46 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-01-31 18:20:26 -0500 |
commit | e50a7a1a42335243c94eeea4a8d23413cb02370d (patch) | |
tree | 070a312c2adfce384b64083b8ae204b4d47ffba9 /fs/nfs/super.c | |
parent | ad6b134008f4e765dd19976552b929273ae523bd (diff) |
NFS: make NFS client allocated per network namespace context
This patch adds new net variable to nfs_client structure. This variable is set
on NFS client creation and cheched during matching NFS client search.
Initially current->nsproxy->net_ns is used as network namespace owner for new
NFS client to create. This network namespace pointer is set during mount
options parsing and thus can be passed from user-spave utils in future if will
be necessary.
Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/super.c')
-rw-r--r-- | fs/nfs/super.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c index 3dfa4f112c0a..73aa75649bf8 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c | |||
@@ -52,6 +52,7 @@ | |||
52 | #include <linux/nfs_xdr.h> | 52 | #include <linux/nfs_xdr.h> |
53 | #include <linux/magic.h> | 53 | #include <linux/magic.h> |
54 | #include <linux/parser.h> | 54 | #include <linux/parser.h> |
55 | #include <linux/nsproxy.h> | ||
55 | 56 | ||
56 | #include <asm/system.h> | 57 | #include <asm/system.h> |
57 | #include <asm/uaccess.h> | 58 | #include <asm/uaccess.h> |
@@ -1107,6 +1108,8 @@ static int nfs_parse_mount_options(char *raw, | |||
1107 | 1108 | ||
1108 | free_secdata(secdata); | 1109 | free_secdata(secdata); |
1109 | 1110 | ||
1111 | mnt->net = current->nsproxy->net_ns; | ||
1112 | |||
1110 | while ((p = strsep(&raw, ",")) != NULL) { | 1113 | while ((p = strsep(&raw, ",")) != NULL) { |
1111 | substring_t args[MAX_OPT_ARGS]; | 1114 | substring_t args[MAX_OPT_ARGS]; |
1112 | unsigned long option; | 1115 | unsigned long option; |