summaryrefslogtreecommitdiffstats
path: root/fs/reiserfs/super.c
diff options
context:
space:
mode:
authorIonut-Gabriel Radu <ihonius@gmail.com>2013-03-10 14:06:23 +0100
committerJan Kara <jack@suse.cz>2013-03-11 22:05:57 +0100
commitaf591ad896ef75585752ac2eab4fba9437f23322 (patch)
treed21c9dd6103e261ae203e08e597dcfa935b7bc70 /fs/reiserfs/super.c
parentext3: Fix format string issues (diff)
downloadlinux-af591ad896ef75585752ac2eab4fba9437f23322.tar.xz
linux-af591ad896ef75585752ac2eab4fba9437f23322.zip
reiserfs: Use kstrdup instead of kmalloc/strcpy
Signed-off-by: Ionut-Gabriel Radu <ihonius@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to '')
-rw-r--r--fs/reiserfs/super.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
index 194113b1b11b..f8a23c3078f8 100644
--- a/fs/reiserfs/super.c
+++ b/fs/reiserfs/super.c
@@ -1147,8 +1147,7 @@ static int reiserfs_parse_options(struct super_block *s, char *options, /* strin
"on filesystem root.");
return 0;
}
- qf_names[qtype] =
- kmalloc(strlen(arg) + 1, GFP_KERNEL);
+ qf_names[qtype] = kstrdup(arg, GFP_KERNEL);
if (!qf_names[qtype]) {
reiserfs_warning(s, "reiserfs-2502",
"not enough memory "
@@ -1156,7 +1155,6 @@ static int reiserfs_parse_options(struct super_block *s, char *options, /* strin
"quotafile name.");
return 0;
}
- strcpy(qf_names[qtype], arg);
if (qtype == USRQUOTA)
*mount_options |= 1 << REISERFS_USRQUOTA;
else