mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Ionut-Gabriel Radu <ihonius@gmail.com>
Cc: viro@zeniv.linux.org.uk, jack@suse.cz,
	artem.bityutskiy@linux.intel.com, shaggy@kernel.org,
	akpm@linux-foundation.org, reiserfs-devel@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] reiserfs: Use kstrdup instead of kmalloc/strcpy
Date: Mon, 11 Mar 2013 14:55:32 +0100	[thread overview]
Message-ID: <20130311135532.GF29799@quack.suse.cz> (raw)
In-Reply-To: <1362920783-17093-1-git-send-email-ihonius@gmail.com>

On Sun 10-03-13 15:06:23, Ionut-Gabriel Radu wrote:
> Signed-off-by: Ionut-Gabriel Radu <ihonius@gmail.com>
  Thanks. Added to my tree.

								Honza

> ---
>  fs/reiserfs/super.c |    4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
> index 194113b..f8a23c3 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
> -- 
> 1.7.10.4
> 
-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR

      reply	other threads:[~2013-03-11 13:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-10 13:06 Ionut-Gabriel Radu
2013-03-11 13:55 ` Jan Kara [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130311135532.GF29799@quack.suse.cz \
    --to=jack@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=artem.bityutskiy@linux.intel.com \
    --cc=ihonius@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=reiserfs-devel@vger.kernel.org \
    --cc=shaggy@kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®