Linux-Fsdevel Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Ming Lei <ming.lei@redhat.com>
To: linux-fsdevel@vger.kernel.org
Cc: Ming Lei <ming.lei@redhat.com>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Christoph Hellwig <hch@lst.de>, Brian Foster <bfoster@redhat.com>,
Dave Chinner <dchinner@redhat.com>, Jens Axboe <axboe@kernel.dk>,
linux-block@vger.kernel.org
Subject: [PATCH] fs/fs-writeback.c: not WARN on unregistered BDI
Date: Thu, 11 Jun 2020 15:22:51 +0800 [thread overview]
Message-ID: <20200611072251.474246-1-ming.lei@redhat.com> (raw)
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@zeniv.linux.org.uk>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Brian Foster <bfoster@redhat.com>
Cc: Dave Chinner <dchinner@redhat.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org
Signed-off-by: Ming Lei <ming.lei@redhat.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;
--
2.25.2
next reply other threads:[~2020-06-11 7:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-11 7:22 Ming Lei [this message]
2020-06-11 7:27 ` Christoph Hellwig
2020-06-22 1:41 ` Ming Lei
2020-07-27 8:14 ` Ming Lei
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200611072251.474246-1-ming.lei@redhat.com \
--to=ming.lei@redhat.com \
--cc=axboe@kernel.dk \
--cc=bfoster@redhat.com \
--cc=dchinner@redhat.com \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
--subject='Re: [PATCH] fs/fs-writeback.c: not WARN on unregistered BDI' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).