diff options
author | Boaz Harrosh <bharrosh@panasas.com> | 2011-08-03 23:18:01 -0400 |
---|---|---|
committer | Boaz Harrosh <bharrosh@panasas.com> | 2011-08-04 15:35:23 -0400 |
commit | 9ce730475e1b950d78a69c1be3410109c103ac98 (patch) | |
tree | 7bc785ad8990932b168a51036e39cadbb03bddfa /fs/exofs/super.c | |
parent | 6d4073e88132259485ef1b2c88daa5e50c95789c (diff) |
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>
Diffstat (limited to 'fs/exofs/super.c')
-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) | |||
698 | odi.osdname_len = strlen(opts->dev_name); | 698 | odi.osdname_len = strlen(opts->dev_name); |
699 | odi.osdname = (u8 *)opts->dev_name; | 699 | odi.osdname = (u8 *)opts->dev_name; |
700 | od = osduld_info_lookup(&odi); | 700 | od = osduld_info_lookup(&odi); |
701 | kfree(opts->dev_name); | ||
702 | opts->dev_name = NULL; | ||
701 | } else { | 703 | } else { |
702 | od = osduld_path_lookup(opts->dev_name); | 704 | od = osduld_path_lookup(opts->dev_name); |
703 | } | 705 | } |
@@ -806,16 +808,12 @@ static int exofs_fill_super(struct super_block *sb, void *data, int silent) | |||
806 | 808 | ||
807 | _exofs_print_device("Mounting", opts->dev_name, sbi->layout.s_ods[0], | 809 | _exofs_print_device("Mounting", opts->dev_name, sbi->layout.s_ods[0], |
808 | sbi->layout.s_pid); | 810 | sbi->layout.s_pid); |
809 | if (opts->is_osdname) | ||
810 | kfree(opts->dev_name); | ||
811 | return 0; | 811 | return 0; |
812 | 812 | ||
813 | free_sbi: | 813 | free_sbi: |
814 | EXOFS_ERR("Unable to mount exofs on %s pid=0x%llx err=%d\n", | 814 | EXOFS_ERR("Unable to mount exofs on %s pid=0x%llx err=%d\n", |
815 | opts->dev_name, sbi->layout.s_pid, ret); | 815 | opts->dev_name, sbi->layout.s_pid, ret); |
816 | exofs_free_sbi(sbi); | 816 | exofs_free_sbi(sbi); |
817 | if (opts->is_osdname) | ||
818 | kfree(opts->dev_name); | ||
819 | return ret; | 817 | return ret; |
820 | } | 818 | } |
821 | 819 | ||