From: Abhijith Das <adas@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] gfs2: fix quota updates on block boundaries
Date: Thu, 4 Jun 2015 12:26:59 -0400 (EDT) [thread overview]
Message-ID: <1705199095.11145194.1433435219453.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20150604105816.GB7070@mwanda>
----- Original Message -----
> From: "Dan Carpenter" <dan.carpenter@oracle.com>
> To: adas at redhat.com
> Cc: cluster-devel at redhat.com
> Sent: Thursday, June 4, 2015 5:58:16 AM
> Subject: re: gfs2: fix quota updates on block boundaries
>
> Hello Abhi Das,
>
> The patch 39a725803bee: "gfs2: fix quota updates on block boundaries"
> from Jun 2, 2015, leads to the following static checker warning:
>
> fs/gfs2/quota.c:801 gfs2_adjust_quota()
> warn: unsigned '()' is never less than zero.
>
> fs/gfs2/quota.c
> 798 loc -= sizeof(q); /* gfs2_internal_read would've advanced the
> loc ptr */
> 799 err = -EIO;
> 800 be64_add_cpu(&q.qu_value, change);
> 801 if (be64_to_cpu(q.qu_value) < 0)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^
> Never true.
>
> 802 q.qu_value = 0; /* Never go negative on quota usage
> */
> 803 qd->qd_qb.qb_value = q.qu_value;
> 804 if (fdq) {
>
> regards,
> dan carpenter
>
Hi Dan,
Thanks for spotting that. Looks like the if condition is missing a (s64) cast.
I'll post another patch to address this.
Cheers!
--Abhi
prev parent reply other threads:[~2015-06-04 16:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-04 10:58 [Cluster-devel] gfs2: fix quota updates on block boundaries Dan Carpenter
2015-06-04 16:26 ` Abhijith Das [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=1705199095.11145194.1433435219453.JavaMail.zimbra@redhat.com \
--to=adas@redhat.com \
/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;
as well as URLs for NNTP newsgroup(s).