diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-08 17:07:53 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-08 17:07:53 -0500 |
commit | 51d0f6d1f50349579f007adf5c0b51aaedd93b94 (patch) | |
tree | 6ea3f2683c3017d63101e708309665727eb2a7cc /fs/btrfs/super.c | |
parent | 57d54889cd00db2752994b389ba714138652e60c (diff) | |
parent | da495ecc0fb096b383754952a1c152147bc95b52 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable
* git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable:
Btrfs: kfree correct pointer during mount option parsing
Btrfs: use RB_ROOT to intialize rb_trees instead of setting rb_node to NULL
Diffstat (limited to 'fs/btrfs/super.c')
-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 8a1ea6e64575..f8b4521de907 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c | |||
@@ -128,7 +128,7 @@ int btrfs_parse_options(struct btrfs_root *root, char *options) | |||
128 | { | 128 | { |
129 | struct btrfs_fs_info *info = root->fs_info; | 129 | struct btrfs_fs_info *info = root->fs_info; |
130 | substring_t args[MAX_OPT_ARGS]; | 130 | substring_t args[MAX_OPT_ARGS]; |
131 | char *p, *num; | 131 | char *p, *num, *orig; |
132 | int intarg; | 132 | int intarg; |
133 | int ret = 0; | 133 | int ret = 0; |
134 | 134 | ||
@@ -143,6 +143,7 @@ int btrfs_parse_options(struct btrfs_root *root, char *options) | |||
143 | if (!options) | 143 | if (!options) |
144 | return -ENOMEM; | 144 | return -ENOMEM; |
145 | 145 | ||
146 | orig = options; | ||
146 | 147 | ||
147 | while ((p = strsep(&options, ",")) != NULL) { | 148 | while ((p = strsep(&options, ",")) != NULL) { |
148 | int token; | 149 | int token; |
@@ -280,7 +281,7 @@ int btrfs_parse_options(struct btrfs_root *root, char *options) | |||
280 | } | 281 | } |
281 | } | 282 | } |
282 | out: | 283 | out: |
283 | kfree(options); | 284 | kfree(orig); |
284 | return ret; | 285 | return ret; |
285 | } | 286 | } |
286 | 287 | ||