diff options
author | Boaz Harrosh <bharrosh@panasas.com> | 2011-08-04 05:18:01 +0200 |
---|---|---|
committer | Boaz Harrosh <bharrosh@panasas.com> | 2011-08-04 21:35:23 +0200 |
commit | 9ce730475e1b950d78a69c1be3410109c103ac98 (patch) | |
tree | 7bc785ad8990932b168a51036e39cadbb03bddfa | |
parent | exofs: BUG: Avoid sbi realloc (diff) | |
download | linux-9ce730475e1b950d78a69c1be3410109c103ac98.tar.xz linux-9ce730475e1b950d78a69c1be3410109c103ac98.zip |
exofs: Small cleanup of exofs_fill_super
Small cleanup that unifies duplicated code used in both the
error and success cases
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
-rw-r--r-- | fs/exofs/super.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/exofs/super.c b/fs/exofs/super.c index a747c871d313..65fe5debe11c 100644 --- a/fs/exofs/super.c +++ b/fs/exofs/super.c @@ -698,6 +698,8 @@ static int exofs_fill_super(struct super_block *sb, void *data, int silent) odi.osdname_len = strlen(opts->dev_name); odi.osdname = (u8 *)opts->dev_name; od = osduld_info_lookup(&odi); + kfree(opts->dev_name); + opts->dev_name = NULL; } else { od = osduld_path_lookup(opts->dev_name); } @@ -806,16 +808,12 @@ static int exofs_fill_super(struct super_block *sb, void *data, int silent) _exofs_print_device("Mounting", opts->dev_name, sbi->layout.s_ods[0], sbi->layout.s_pid); - if (opts->is_osdname) - kfree(opts->dev_name); return 0; free_sbi: EXOFS_ERR("Unable to mount exofs on %s pid=0x%llx err=%d\n", opts->dev_name, sbi->layout.s_pid, ret); exofs_free_sbi(sbi); - if (opts->is_osdname) - kfree(opts->dev_name); return ret; } |