mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-04 20:19:47 +08:00
reiserfs: Use kstrdup instead of kmalloc/strcpy
Signed-off-by: Ionut-Gabriel Radu <ihonius@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz>
This commit is contained in:
parent
8d0c2d10dd
commit
af591ad896
@ -1147,8 +1147,7 @@ static int reiserfs_parse_options(struct super_block *s, char *options, /* strin
|
|||||||
"on filesystem root.");
|
"on filesystem root.");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
qf_names[qtype] =
|
qf_names[qtype] = kstrdup(arg, GFP_KERNEL);
|
||||||
kmalloc(strlen(arg) + 1, GFP_KERNEL);
|
|
||||||
if (!qf_names[qtype]) {
|
if (!qf_names[qtype]) {
|
||||||
reiserfs_warning(s, "reiserfs-2502",
|
reiserfs_warning(s, "reiserfs-2502",
|
||||||
"not enough memory "
|
"not enough memory "
|
||||||
@ -1156,7 +1155,6 @@ static int reiserfs_parse_options(struct super_block *s, char *options, /* strin
|
|||||||
"quotafile name.");
|
"quotafile name.");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
strcpy(qf_names[qtype], arg);
|
|
||||||
if (qtype == USRQUOTA)
|
if (qtype == USRQUOTA)
|
||||||
*mount_options |= 1 << REISERFS_USRQUOTA;
|
*mount_options |= 1 << REISERFS_USRQUOTA;
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user