Removed unneeded 'and' masking --- right shift discards the lower bits anyway, so there is no need to clear them. This is also needed for the correctness of the following patch dm-snapshot-32bit-chunk-size.patch, that makes chunk_mask 32-bit. Signed-off-by: Mikulas Patocka --- drivers/md/dm-snap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: linux-2.6.28-rc3-devel/drivers/md/dm-snap.h =================================================================== --- linux-2.6.28-rc3-devel.orig/drivers/md/dm-snap.h 2008-11-07 18:57:25.000000000 +0100 +++ linux-2.6.28-rc3-devel/drivers/md/dm-snap.h 2008-11-07 18:58:22.000000000 +0100 @@ -200,7 +200,7 @@ static inline sector_t get_dev_size(stru static inline chunk_t sector_to_chunk(struct dm_snapshot *s, sector_t sector) { - return (sector & ~s->chunk_mask) >> s->chunk_shift; + return sector >> s->chunk_shift; } static inline sector_t chunk_to_sector(struct dm_snapshot *s, chunk_t chunk)