From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bart Van Assche Date: Mon, 17 Jun 2019 15:45:14 +0000 Subject: Re: [PATCH V2 0/7] block: use right accessor to read nr_setcs Message-Id: List-Id: References: <20190617012832.4311-1-chaitanya.kulkarni@wdc.com> In-Reply-To: <20190617012832.4311-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Chaitanya Kulkarni , linux-block@vger.kernel.org Cc: colyli@suse.de, linux-bcache@vger.kernel.org, linux-btrace@vger.kernel.org, kent.overstreet@gmail.com, jaegeuk@kernel.org, damien.lemoal@wdc.com On 6/16/19 6:28 PM, Chaitanya Kulkarni wrote: > In the blk-zoned, bcache, f2fs and blktrace implementation > block device->hd_part->number of sectors field is accessed directly > without any appropriate locking or accessor function. There is > an existing accessor function present in the in include/linux/genhd.h > which should be used to read the bdev->hd_part->nr_sects. In the subject, "nr_setcs" should probably be changed into "nr_sects"? Bart.