From: Jan Kara <jack@suse.cz>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Jan Kara <jack@suse.com>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] quota: remove an unneeded condition
Date: Tue, 11 Aug 2015 10:03:11 +0200 [thread overview]
Message-ID: <20150811080311.GC2650@quack.suse.cz> (raw)
In-Reply-To: <20150810212955.GA31724@mwanda>
On Tue 11-08-15 00:29:55, Dan Carpenter wrote:
> We know "ret" is zero here so we can remove this condition.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Thanks. I've added the patch to my tree.
Honza
> diff --git a/fs/quota/quota.c b/fs/quota/quota.c
> index 86ded73..3746367 100644
> --- a/fs/quota/quota.c
> +++ b/fs/quota/quota.c
> @@ -141,9 +141,9 @@ static int quota_getinfo(struct super_block *sb, int type, void __user *addr)
> if (tstate->flags & QCI_ROOT_SQUASH)
> uinfo.dqi_flags |= DQF_ROOT_SQUASH;
> uinfo.dqi_valid = IIF_ALL;
> - if (!ret && copy_to_user(addr, &uinfo, sizeof(uinfo)))
> + if (copy_to_user(addr, &uinfo, sizeof(uinfo)))
> return -EFAULT;
> - return ret;
> + return 0;
> }
>
> static int quota_setinfo(struct super_block *sb, int type, void __user *addr)
>
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
prev parent reply other threads:[~2015-08-11 8:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-10 21:29 [patch] quota: remove an unneeded condition Dan Carpenter
2015-08-11 8: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=20150811080311.GC2650@quack.suse.cz \
--to=jack@suse.cz \
--cc=dan.carpenter@oracle.com \
--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