aboutsummaryrefslogtreecommitdiffstats
path: root/fs/9p
diff options
context:
space:
mode:
Diffstat (limited to 'fs/9p')
-rw-r--r--fs/9p/v9fs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c
index 756f7e9beb2e..fbb12dadba83 100644
--- a/fs/9p/v9fs.c
+++ b/fs/9p/v9fs.c
@@ -82,7 +82,7 @@ static match_table_t tokens = {
82 82
83static void v9fs_parse_options(struct v9fs_session_info *v9ses) 83static void v9fs_parse_options(struct v9fs_session_info *v9ses)
84{ 84{
85 char *options = v9ses->options; 85 char *options;
86 substring_t args[MAX_OPT_ARGS]; 86 substring_t args[MAX_OPT_ARGS];
87 char *p; 87 char *p;
88 int option; 88 int option;
@@ -96,9 +96,10 @@ static void v9fs_parse_options(struct v9fs_session_info *v9ses)
96 v9ses->cache = 0; 96 v9ses->cache = 0;
97 v9ses->trans = v9fs_default_trans(); 97 v9ses->trans = v9fs_default_trans();
98 98
99 if (!options) 99 if (!v9ses->options)
100 return; 100 return;
101 101
102 options = kstrdup(v9ses->options, GFP_KERNEL);
102 while ((p = strsep(&options, ",")) != NULL) { 103 while ((p = strsep(&options, ",")) != NULL) {
103 int token; 104 int token;
104 if (!*p) 105 if (!*p)
@@ -169,6 +170,7 @@ static void v9fs_parse_options(struct v9fs_session_info *v9ses)
169 continue; 170 continue;
170 } 171 }
171 } 172 }
173 kfree(options);
172} 174}
173 175
174/** 176/**