From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757024AbcBBUO2 (ORCPT ); Tue, 2 Feb 2016 15:14:28 -0500 Received: from mga04.intel.com ([192.55.52.120]:40430 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753415AbcBBUO0 (ORCPT ); Tue, 2 Feb 2016 15:14:26 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,386,1449561600"; d="scan'208";a="739360417" Date: Tue, 2 Feb 2016 15:14:22 -0500 From: Matthew Wilcox To: Dan Williams Cc: Ross Zwisler , Jan Kara , Dave Chinner , Christoph Hellwig , "linux-kernel@vger.kernel.org" , Alexander Viro , Andrew Morton , Jan Kara , linux-fsdevel , linux-nvdimm Subject: Re: [PATCH 2/2] dax: fix bdev NULL pointer dereferences Message-ID: <20160202201422.GB3260@linux.intel.com> References: <20160201145147.GD13740@quack.suse.cz> <20160201214730.GR20456@dastard> <20160202111723.GD12574@quack.suse.cz> <20160202164642.GE12574@quack.suse.cz> <20160202173456.GB23963@linux.intel.com> <20160202184643.GA3260@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 02, 2016 at 10:59:41AM -0800, Dan Williams wrote: > True, but in this case we're just trying to resolve the bdev for a > inode / sector combination to already allocated storage. So > get_block() is a misnomer, this is just get_bdev() to resolve a > super_block-inode+sector tuple to a bdev for cases when s_bdev is the > wrong answer. Then let's call it that. i_ops->get_bdev(struct inode *inode, pgoff_t index) And if it doesn't exist, use i_sb->s_bdev.