lkml.org 
[lkml]   [2020]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH] blk: use REQ_OP_WRITE instead of hard code
    use REQ_OP_WRITE instead of hard code in
    op_is_write().

    Signed-off-by: Hui Su <sh_def@163.com>
    ---
    include/linux/blk_types.h | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h
    index 7d7c13238fdb..7b9b02378c24 100644
    --- a/include/linux/blk_types.h
    +++ b/include/linux/blk_types.h
    @@ -440,7 +440,7 @@ static inline void bio_set_op_attrs(struct bio *bio, unsigned op,

    static inline bool op_is_write(unsigned int op)
    {
    - return (op & 1);
    + return (op & REQ_OP_WRITE);
    }

    /*
    --
    2.25.1

    \
     
     \ /
      Last update: 2020-10-19 15:51    [W:4.412 / U:0.416 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site