From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752098AbcEIOz1 (ORCPT ); Mon, 9 May 2016 10:55:27 -0400 Received: from mail-io0-f170.google.com ([209.85.223.170]:33697 "EHLO mail-io0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751110AbcEIOzY (ORCPT ); Mon, 9 May 2016 10:55:24 -0400 Subject: Re: [PATCH BUGFIX] block: add missing group association in bio_split To: Paolo , Jeff Moyer References: <1462567512-3007-1-git-send-email-paolo.valente@linaro.org> <5730A108.1000703@linaro.org> Cc: Tejun Heo , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, ulf.hansson@linaro.org, linus.walleij@linaro.org, broonie@kernel.org, stable@vger.kernel.org From: Jens Axboe Message-ID: <5730A4D9.40602@kernel.dk> Date: Mon, 9 May 2016 08:55:21 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <5730A108.1000703@linaro.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/09/2016 08:39 AM, Paolo wrote: > Il 09/05/2016 16:35, Jeff Moyer ha scritto: >> Jeff Moyer writes: >> >>> Paolo Valente writes: >>> >>>> @@ -1811,6 +1811,11 @@ struct bio *bio_split(struct bio *bio, int >>>> sectors, >>>> >>>> bio_advance(bio, split->bi_iter.bi_size); >>>> >>>> +#ifdef CONFIG_BLK_CGROUP >>>> + if (bio->bi_css) >>>> + bio_associate_blkcg(split, bio->bi_css); >>>> +#endif >>>> + >>>> return split; >>>> } >>>> EXPORT_SYMBOL(bio_split); >>> >>> Get rid of the #ifdefery. This should be just: >>> >>> bio_associate_blkcg(split, bio->bi_css); >> >> Gah, I see that the bi_css member is only present for CONFIG_BLK_CGROUP. >> I guess we'll have to live with the ifdef. >> > > We have already tried to remove it, but it seems it would require other > major changes. It'd be cleaner to have a bio_clone_associate_blkcg(split, bio); or similar, and then hide it in there. -- Jens Axboe