Commit e3a7a3bf authored by Jens Axboe's avatar Jens Axboe

block: don't hardcode blk_qc_t -> tag mask

Use the shift/mask we use elsewhere.
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent cadfbb6e
...@@ -265,7 +265,7 @@ static inline unsigned int blk_qc_t_to_queue_num(blk_qc_t cookie) ...@@ -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) 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 */ #endif /* __LINUX_BLK_TYPES_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment