public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] ceph: remove unneeded truncation
@ 2013-05-23 18:36 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2013-05-23 18:36 UTC (permalink / raw)
  To: Sage Weil; +Cc: ceph-devel, kernel-janitors

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 */

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-05-23 18:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-23 18:36 [patch] ceph: remove unneeded truncation Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox