1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

dev-swap: use SECTOR_SHIFT

This commit is contained in:
Zdenek Kabelac 2014-03-22 20:43:05 +01:00
parent 936bfeb8de
commit c595b20e56

View File

@ -59,7 +59,7 @@ int dev_is_swap(struct device *dev, uint64_t *offset_found)
*/
if (page == 0x8000)
continue;
if (size < (page / 512))
if (size < (page >> SECTOR_SHIFT))
break;
if (!dev_read(dev, page - SIGNATURE_SIZE,
SIGNATURE_SIZE, buf)) {