mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
dm snapshot: simplify sector_to_chunk expression
Removed unnecessary 'and' masking: The right shift discards the lower bits so there is no need to clear them. (A later patch needs this change to support a 32-bit chunk_mask.) Signed-off-by: Mikulas Patocka <[email protected]> Reviewed-by: Mike Snitzer <[email protected]> Reviewed-by: Jonathan Brassow <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]>
This commit is contained in:
parent
f5acc83428
commit
102c6ddb1d
1 changed files with 1 additions and 1 deletions
|
|
@ -162,7 +162,7 @@ static inline sector_t get_dev_size(struct block_device *bdev)
|
|||
static inline chunk_t sector_to_chunk(struct dm_exception_store *store,
|
||||
sector_t sector)
|
||||
{
|
||||
return (sector & ~store->chunk_mask) >> store->chunk_shift;
|
||||
return sector >> store->chunk_shift;
|
||||
}
|
||||
|
||||
int dm_exception_store_type_register(struct dm_exception_store_type *type);
|
||||
|
|
|
|||
Loading…
Reference in a new issue