Skip to content

Commit 401efbf

Browse files
htejunaxboe
authored andcommitted
blkcg: remove unnecessary request_list->blkg NULL test in blk_put_rl()
Since ec13b1d ("blkcg: always create the blkcg_gq for the root blkcg"), a request_list always has its blkg associated. Drop unnecessary rl->blkg NULL test from blk_put_rl(). Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Jens Axboe <axboe@fb.com>
1 parent 60a8370 commit 401efbf

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

include/linux/blk-cgroup.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,8 +394,7 @@ static inline struct request_list *blk_get_rl(struct request_queue *q,
394394
*/
395395
static inline void blk_put_rl(struct request_list *rl)
396396
{
397-
/* root_rl may not have blkg set */
398-
if (rl->blkg && rl->blkg->blkcg != &blkcg_root)
397+
if (rl->blkg->blkcg != &blkcg_root)
399398
blkg_put(rl->blkg);
400399
}
401400

0 commit comments

Comments
 (0)