@@ -956,8 +956,7 @@ static inline blk_status_t blk_check_zone_append(struct request_queue *q,
956956 return BLK_STS_OK ;
957957}
958958
959- static noinline_for_stack bool
960- generic_make_request_checks (struct bio * bio )
959+ static noinline_for_stack bool submit_bio_checks (struct bio * bio )
961960{
962961 struct request_queue * q = bio -> bi_disk -> queue ;
963962 blk_status_t status = BLK_STS_IOERR ;
@@ -985,9 +984,8 @@ generic_make_request_checks(struct bio *bio)
985984 }
986985
987986 /*
988- * Filter flush bio's early so that make_request based
989- * drivers without flush support don't have to worry
990- * about them.
987+ * Filter flush bio's early so that bio based drivers without flush
988+ * support don't have to worry about them.
991989 */
992990 if (op_is_flush (bio -> bi_opf ) &&
993991 !test_bit (QUEUE_FLAG_WC , & q -> queue_flags )) {
@@ -1072,7 +1070,7 @@ generic_make_request_checks(struct bio *bio)
10721070 return false;
10731071}
10741072
1075- static blk_qc_t do_make_request (struct bio * bio )
1073+ static blk_qc_t __submit_bio (struct bio * bio )
10761074{
10771075 struct gendisk * disk = bio -> bi_disk ;
10781076 blk_qc_t ret = BLK_QC_T_NONE ;
@@ -1087,15 +1085,15 @@ static blk_qc_t do_make_request(struct bio *bio)
10871085}
10881086
10891087/**
1090- * generic_make_request - re-submit a bio to the block device layer for I/O
1088+ * submit_bio_noacct - re-submit a bio to the block device layer for I/O
10911089 * @bio: The bio describing the location in memory and on the device.
10921090 *
10931091 * This is a version of submit_bio() that shall only be used for I/O that is
10941092 * resubmitted to lower level drivers by stacking block drivers. All file
10951093 * systems and other upper level users of the block layer should use
10961094 * submit_bio() instead.
10971095 */
1098- blk_qc_t generic_make_request (struct bio * bio )
1096+ blk_qc_t submit_bio_noacct (struct bio * bio )
10991097{
11001098 /*
11011099 * bio_list_on_stack[0] contains bios submitted by the current
@@ -1106,15 +1104,15 @@ blk_qc_t generic_make_request(struct bio *bio)
11061104 struct bio_list bio_list_on_stack [2 ];
11071105 blk_qc_t ret = BLK_QC_T_NONE ;
11081106
1109- if (!generic_make_request_checks (bio ))
1107+ if (!submit_bio_checks (bio ))
11101108 goto out ;
11111109
11121110 /*
11131111 * We only want one ->submit_bio to be active at a time, else
11141112 * stack usage with stacked devices could be a problem. So use
11151113 * current->bio_list to keep a list of requests submited by a
11161114 * ->submit_bio method. current->bio_list is also used as a
1117- * flag to say if generic_make_request is currently active in this
1115+ * flag to say if submit_bio_noacct is currently active in this
11181116 * task or not. If it is NULL, then no make_request is active. If
11191117 * it is non-NULL, then a make_request is active, and new requests
11201118 * should be added at the tail
@@ -1132,7 +1130,7 @@ blk_qc_t generic_make_request(struct bio *bio)
11321130 * we assign bio_list to a pointer to the bio_list_on_stack,
11331131 * thus initialising the bio_list of new bios to be
11341132 * added. ->submit_bio() may indeed add some more bios
1135- * through a recursive call to generic_make_request . If it
1133+ * through a recursive call to submit_bio_noacct . If it
11361134 * did, we find a non-NULL value in bio_list and re-enter the loop
11371135 * from the top. In this case we really did just take the bio
11381136 * of the top of the list (no pretending) and so remove it from
@@ -1150,7 +1148,7 @@ blk_qc_t generic_make_request(struct bio *bio)
11501148 /* Create a fresh bio_list for all subordinate requests */
11511149 bio_list_on_stack [1 ] = bio_list_on_stack [0 ];
11521150 bio_list_init (& bio_list_on_stack [0 ]);
1153- ret = do_make_request (bio );
1151+ ret = __submit_bio (bio );
11541152
11551153 /* sort new bios into those for a lower level
11561154 * and those for the same level
@@ -1174,13 +1172,13 @@ blk_qc_t generic_make_request(struct bio *bio)
11741172out :
11751173 return ret ;
11761174}
1177- EXPORT_SYMBOL (generic_make_request );
1175+ EXPORT_SYMBOL (submit_bio_noacct );
11781176
11791177/**
11801178 * direct_make_request - hand a buffer directly to its device driver for I/O
11811179 * @bio: The bio describing the location in memory and on the device.
11821180 *
1183- * This function behaves like generic_make_request (), but does not protect
1181+ * This function behaves like submit_bio_noacct (), but does not protect
11841182 * against recursion. Must only be used if the called driver is known
11851183 * to be blk-mq based.
11861184 */
@@ -1192,7 +1190,7 @@ blk_qc_t direct_make_request(struct bio *bio)
11921190 bio_io_error (bio );
11931191 return BLK_QC_T_NONE ;
11941192 }
1195- if (!generic_make_request_checks (bio ))
1193+ if (!submit_bio_checks (bio ))
11961194 return BLK_QC_T_NONE ;
11971195 if (unlikely (bio_queue_enter (bio )))
11981196 return BLK_QC_T_NONE ;
@@ -1263,13 +1261,13 @@ blk_qc_t submit_bio(struct bio *bio)
12631261 blk_qc_t ret ;
12641262
12651263 psi_memstall_enter (& pflags );
1266- ret = generic_make_request (bio );
1264+ ret = submit_bio_noacct (bio );
12671265 psi_memstall_leave (& pflags );
12681266
12691267 return ret ;
12701268 }
12711269
1272- return generic_make_request (bio );
1270+ return submit_bio_noacct (bio );
12731271}
12741272EXPORT_SYMBOL (submit_bio );
12751273
0 commit comments