mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: SF Markus Elfring <elfring@users.sourceforge.net>
Cc: Jan Kara <jack@suse.com>,
	kernel-janitors@vger.kernel.org,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] quota_v2: Delete an error message for a failed memory allocation in v2_read_file_info()
Date: Mon, 21 Aug 2017 16:03:49 +0200	[thread overview]
Message-ID: <20170821140349.GA31870@quack2.suse.cz> (raw)
In-Reply-To: <8916fd8c-2f13-e343-d648-1174563e9c38@users.sourceforge.net>

On Wed 16-08-17 16:41:00, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Wed, 16 Aug 2017 16:16:30 +0200
> 
> Omit an extra message for a memory allocation failure in this function.
> 
> This issue was detected by using the Coccinelle software.
> 
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>

OK, applied the patch to my tree. Thanks.

								Honza

> ---
>  fs/quota/quota_v2.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/fs/quota/quota_v2.c b/fs/quota/quota_v2.c
> index ca71bf881ad1..2259329616b7 100644
> --- a/fs/quota/quota_v2.c
> +++ b/fs/quota/quota_v2.c
> @@ -109,11 +109,9 @@ static int v2_read_file_info(struct super_block *sb, int type)
>  		return -1;
>  	}
>  	info->dqi_priv = kmalloc(sizeof(struct qtree_mem_dqinfo), GFP_NOFS);
> -	if (!info->dqi_priv) {
> -		printk(KERN_WARNING
> -		       "Not enough memory for quota information structure.\n");
> +	if (!info->dqi_priv)
>  		return -ENOMEM;
> -	}
> +
>  	qinfo = info->dqi_priv;
>  	if (version == 0) {
>  		/* limits are stored as unsigned 32-bit data */
> -- 
> 2.14.0
> 
> 
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

      reply	other threads:[~2017-08-21 14:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-16 14:41 SF Markus Elfring
2017-08-21 14:03 ` 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=20170821140349.GA31870@quack2.suse.cz \
    --to=jack@suse.cz \
    --cc=elfring@users.sourceforge.net \
    --cc=jack@suse.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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®