[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20200727081416.GB1146643@T590>
Date: Mon, 27 Jul 2020 16:14:16 +0800
From: Ming Lei <ming.lei@...hat.com>
To: linux-fsdevel@...r.kernel.org
Cc: Alexander Viro <viro@...iv.linux.org.uk>,
Christoph Hellwig <hch@....de>,
Brian Foster <bfoster@...hat.com>,
Dave Chinner <dchinner@...hat.com>,
Jens Axboe <axboe@...nel.dk>, linux-block@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] fs/fs-writeback.c: not WARN on unregistered BDI
On Thu, Jun 11, 2020 at 03:22:51PM +0800, Ming Lei wrote:
> BDI is unregistered from del_gendisk() which is usually done in device's
> release handler from device hotplug or error handling context, so BDI
> can be unregistered anytime.
>
> It should be normal for __mark_inode_dirty to see un-registered BDI,
> so kill the WARN().
>
> Cc: Alexander Viro <viro@...iv.linux.org.uk>
> Cc: Christoph Hellwig <hch@....de>
> Cc: Brian Foster <bfoster@...hat.com>
> Cc: Dave Chinner <dchinner@...hat.com>
> Cc: Jens Axboe <axboe@...nel.dk>
> Cc: linux-block@...r.kernel.org
> Signed-off-by: Ming Lei <ming.lei@...hat.com>
> ---
> fs/fs-writeback.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
> index a605c3dddabc..5e718580d4bf 100644
> --- a/fs/fs-writeback.c
> +++ b/fs/fs-writeback.c
> @@ -2318,10 +2318,6 @@ void __mark_inode_dirty(struct inode *inode, int flags)
>
> wb = locked_inode_to_wb_and_lock_list(inode);
>
> - WARN(bdi_cap_writeback_dirty(wb->bdi) &&
> - !test_bit(WB_registered, &wb->state),
> - "bdi-%s not registered\n", bdi_dev_name(wb->bdi));
> -
> inode->dirtied_when = jiffies;
> if (dirtytime)
> inode->dirtied_time_when = jiffies;
Hello Alexander,
Could you merge this patch if you are fine?
Thanks,
Ming
Powered by blists - more mailing lists