Skip to contentSkip to conversation

ceph: remove unneeded truncation

PATCH New Dan Carpenter 1 participant 1 message May 23, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ceph: remove unneeded truncation

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.

fs/ceph/ioctl.c +1 -1
index e0b4ef3..98fe5e7 100644
@@ -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 */