From: Dan Carpenter <dan.carpenter@oracle.com>
To: Sage Weil <sage@inktank.com>
Cc: ceph-devel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] ceph: remove unneeded truncation
Date: Thu, 23 May 2013 18:36:37 +0000 [thread overview]
Message-ID: <20130523183636.GA10316@elgon.mountain> (raw)
My static checker complains l->stripe_unit could still be zero after we
truncate it to 32 bits. I don't see a reason to do the truncation so
I have removed it. Both sides are u64 type.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/fs/ceph/ioctl.c b/fs/ceph/ioctl.c
index e0b4ef3..98fe5e7 100644
--- a/fs/ceph/ioctl.c
+++ b/fs/ceph/ioctl.c
@@ -43,7 +43,7 @@ static long __validate_layout(struct ceph_mds_client *mdsc,
if ((l->object_size & ~PAGE_MASK) ||
(l->stripe_unit & ~PAGE_MASK) ||
(l->stripe_unit != 0 &&
- ((unsigned)l->object_size % (unsigned)l->stripe_unit)))
+ (l->object_size % l->stripe_unit)))
return -EINVAL;
/* make sure it's a valid data pool */
reply other threads:[~2013-05-23 18:36 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20130523183636.GA10316@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=ceph-devel@vger.kernel.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=sage@inktank.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