Whamcloud - gitweb
b=22514 Update RHEL5.5 & OEL5.5 to latest kernel.
[fs/lustre-release.git] / lustre / llite / lloop.c
index 3976da3..4dfcbea 100644 (file)
@@ -541,7 +541,9 @@ static int loop_set_fd(struct lloop_device *lo, struct file *unused,
         lo->lo_queue->unplug_fn = loop_unplug;
 
         /* queue parameters */
-        blk_queue_logical_block_size(lo->lo_queue, CFS_PAGE_SIZE);
+        CLASSERT(CFS_PAGE_SIZE < (1 << (sizeof(unsigned short) * 8)));
+        blk_queue_logical_block_size(lo->lo_queue,
+                                     (unsigned short)CFS_PAGE_SIZE);
         blk_queue_max_sectors(lo->lo_queue,
                               LLOOP_MAX_SEGMENTS << (CFS_PAGE_SHIFT - 9));
         blk_queue_max_phys_segments(lo->lo_queue, LLOOP_MAX_SEGMENTS);