From: Christoph Hellwig <hch@lst.de>
To: Hannes Reinecke <hare@suse.de>
Cc: linux-block@vger.kernel.org, Jaegeuk Kim <jaegeuk@kernel.org>,
Christoph Hellwig <hch@lst.de>,
linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH] f2fs: don't reopen the main block device in f2fs_scan_devices
Date: Tue, 11 Jul 2023 08:22:33 +0200 [thread overview]
Message-ID: <20230711062233.GB20392@lst.de> (raw)
In-Reply-To: <63766a54-54db-20a7-ba2f-d31fd230623d@suse.de>
On Tue, Jul 11, 2023 at 08:19:50AM +0200, Hannes Reinecke wrote:
>> for (i = 0; i < sbi->s_ndevs; i++) {
>> - blkdev_put(FDEV(i).bdev, sbi->sb->s_type);
>> + if (i > 0)
>> + blkdev_put(FDEV(i).bdev, sbi->sb->s_type);
> You could have started the loop at '1', and avoid the curious 'if' clause
That's what the previous version did, which caused a NULL pointer
dereference discussed in this thread, as well as a compile error for
non-zoned builds..
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
next prev parent reply other threads:[~2023-07-11 6:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-07 9:40 [f2fs-dev] [PATCH] f2fs: don't reopen the main block device in f2fs_scan_devices Christoph Hellwig
2023-07-10 21:22 ` Jaegeuk Kim
2023-07-10 23:51 ` Damien Le Moal
2023-07-11 1:52 ` Jaegeuk Kim
2023-07-11 2:00 ` Damien Le Moal
2023-07-11 5:01 ` Christoph Hellwig
2023-07-11 6:19 ` Hannes Reinecke
2023-07-11 6:22 ` Christoph Hellwig [this message]
2023-07-11 16:17 ` Jaegeuk Kim
2023-07-17 15:16 ` Chao Yu
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=20230711062233.GB20392@lst.de \
--to=hch@lst.de \
--cc=hare@suse.de \
--cc=jaegeuk@kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
/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;
as well as URLs for NNTP newsgroup(s).