From: weiping zhang <zhangweiping@didichuxing.com>
To: Jan Kara <jack@suse.cz>
Cc: axboe@kernel.dk, linux-mm@kvack.org
Subject: Re: [PATCH] bdi: add check before create debugfs dir or files
Date: Thu, 26 Oct 2017 22:33:56 +0800 [thread overview]
Message-ID: <20171026143336.GA13166@source.didichuxing.com> (raw)
In-Reply-To: <20171026135405.GC31161@quack2.suse.cz>
On Thu, Oct 26, 2017 at 03:54:05PM +0200, Jan Kara wrote:
> On Wed 25-10-17 23:23:18, weiping zhang wrote:
> > we should make sure parents directory exist, and then create dir or
> > files under that.
> >
> > Signed-off-by: weiping zhang <zhangweiping@didichuxing.com>
>
> OK, this looks reasonable to me but instead of instead of just leaving
> debugfs in half-initialized state, we should rather properly tear it down,
> return error from bdi_debug_register() and handle it in
> bdi_register_va()...
>
>
At beginning I try to return error code to caller, then I find
bdi_register_owner's return value was not checked in device_add_disk,
so I think there may have some stories. But now, I found we must check
bdi_register_owner in device_add_disk, otherwise bdi may lead some
undefined behavior. blk_mq_debugfs_register also has same issue.
I will send new patch series to fix these issues.
--
weiping
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2017-10-26 14:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-25 15:23 weiping zhang
2017-10-26 13:54 ` Jan Kara
2017-10-26 14:33 ` weiping zhang [this message]
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=20171026143336.GA13166@source.didichuxing.com \
--to=zhangweiping@didichuxing.com \
--cc=axboe@kernel.dk \
--cc=jack@suse.cz \
--cc=linux-mm@kvack.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox