On 2019/11/12 6:18, Chaitanya Kulkarni wrote: > This patch exports blk_should_abort() function to avoid dulicate code. s/dulicate/duplicate And why export this symbol ? It is not used in kernel modules so I do not see the need for it. In any case, the export should be EXPORT_SYMBOL_GPL(). > > Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@xxxxxxx> > --- > block/blk-lib.c | 3 ++- > block/blk.h | 2 ++ > 2 files changed, 4 insertions(+), 1 deletion(-) > > diff --git a/block/blk-lib.c b/block/blk-lib.c > index 6ca7cae62876..c0afddb2a67b 100644 > --- a/block/blk-lib.c > +++ b/block/blk-lib.c > @@ -11,7 +11,7 @@ > > #include "blk.h" > > -static int blk_should_abort(struct bio *bio) > +int blk_should_abort(struct bio *bio) > { > int ret; > > @@ -22,6 +22,7 @@ static int blk_should_abort(struct bio *bio) > bio_put(bio); > return ret ? ret : -EINTR; > } > +EXPORT_SYMBOL(blk_should_abort); > > struct bio *blk_next_bio(struct bio *bio, unsigned int nr_pages, gfp_t gfp) > { > diff --git a/block/blk.h b/block/blk.h > index 2bea40180b6f..63fa4694d333 100644 > --- a/block/blk.h > +++ b/block/blk.h > @@ -297,6 +297,8 @@ static inline struct io_context *create_io_context(gfp_t gfp_mask, int node) > return current->io_context; > } > > +int blk_should_abort(struct bio *bio); > + > /* > * Internal throttling interface > */ > -- Damien Le Moal Western Digital Research