diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/super.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index f50253c2279d..78ee681465af 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c | |||
@@ -277,7 +277,7 @@ static int btrfs_parse_early_options(const char *options, fmode_t flags, | |||
277 | struct btrfs_fs_devices **fs_devices) | 277 | struct btrfs_fs_devices **fs_devices) |
278 | { | 278 | { |
279 | substring_t args[MAX_OPT_ARGS]; | 279 | substring_t args[MAX_OPT_ARGS]; |
280 | char *opts, *p; | 280 | char *opts, *orig, *p; |
281 | int error = 0; | 281 | int error = 0; |
282 | int intarg; | 282 | int intarg; |
283 | 283 | ||
@@ -291,6 +291,7 @@ static int btrfs_parse_early_options(const char *options, fmode_t flags, | |||
291 | opts = kstrdup(options, GFP_KERNEL); | 291 | opts = kstrdup(options, GFP_KERNEL); |
292 | if (!opts) | 292 | if (!opts) |
293 | return -ENOMEM; | 293 | return -ENOMEM; |
294 | orig = opts; | ||
294 | 295 | ||
295 | while ((p = strsep(&opts, ",")) != NULL) { | 296 | while ((p = strsep(&opts, ",")) != NULL) { |
296 | int token; | 297 | int token; |
@@ -326,7 +327,7 @@ static int btrfs_parse_early_options(const char *options, fmode_t flags, | |||
326 | } | 327 | } |
327 | 328 | ||
328 | out_free_opts: | 329 | out_free_opts: |
329 | kfree(opts); | 330 | kfree(orig); |
330 | out: | 331 | out: |
331 | /* | 332 | /* |
332 | * If no subvolume name is specified we use the default one. Allocate | 333 | * If no subvolume name is specified we use the default one. Allocate |