Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
  • linux
  • include
  • linux
  • blk_types.h
Find file BlameHistoryPermalink
  • Bart Van Assche's avatar
    block: Improve bio_set_op_attrs() robustness · 3e1de31b
    Bart Van Assche authored Sep 14, 2016
    
    
    Since REQ_OP_BITS == 3 and __REQ_NR_BITS == 30 it is not that hard
    to pass an op_flags argument to bio_set_op_attrs() that is larger
    than the number of bits reserved for the op_flags argument. Complain
    if this happens. Additionally, ensure that negative arguments trigger
    a complaint (1 << ... is signed while 1U << ... is unsigned; adding
    0U to an integer expression causes it to be promoted to an unsigned
    type).
    
    Signed-off-by: default avatarBart Van Assche <bart.vanassche@sandisk.com>
    Cc: Mike Christie <mchristi@redhat.com>
    Cc: Christoph Hellwig <hch@lst.de>
    Cc: Hannes Reinecke <hare@suse.de>
    Cc: Damien Le Moal <damien.lemoal@hgst.com>
    Reviewed-by: default avatarJohannes Thumshirn <jthumshirn@suse.de>
    Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
    Signed-off-by: default avatarJens Axboe <axboe@fb.com>
    3e1de31b
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7