Skip to content

Commit

Permalink
block: don't hardcode blk_qc_t -> tag mask
Browse files Browse the repository at this point in the history
Use the shift/mask we use elsewhere.

Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
axboe committed Nov 11, 2015
1 parent cadfbb6 commit e3a7a3b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/blk_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ static inline unsigned int blk_qc_t_to_queue_num(blk_qc_t cookie)

static inline unsigned int blk_qc_t_to_tag(blk_qc_t cookie)
{
return cookie & 0xffff;
return cookie & ((1u << BLK_QC_T_SHIFT) - 1);
}

#endif /* __LINUX_BLK_TYPES_H */

0 comments on commit e3a7a3b

Please sign in to comment.