Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752920AbdLWMBA (ORCPT ); Sat, 23 Dec 2017 07:01:00 -0500 Received: from mail-yw0-f195.google.com ([209.85.161.195]:34514 "EHLO mail-yw0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752157AbdLWMA5 (ORCPT ); Sat, 23 Dec 2017 07:00:57 -0500 X-Google-Smtp-Source: ACJfBouej72o+pt1Ya8dXc07O1wDBk2EdLL2Q9rVVaOw4DKAmF4Z3QE6Crp9gppUSW4wyab249nDcVaBVi4rO9T1TmY= MIME-Version: 1.0 In-Reply-To: <17fbec10-68b1-2d2b-d417-2cdfee22b0fa@coly.li> References: <17fbec10-68b1-2d2b-d417-2cdfee22b0fa@coly.li> From: Dongsu Park Date: Sat, 23 Dec 2017 13:00:56 +0100 Message-ID: Subject: Re: [PATCH 01/11] block_dev: Support checking inode permissions in lookup_bdev() To: Coly Li Cc: linux-kernel@vger.kernel.org, containers@lists.linux-foundation.org, Alban Crequy , "Eric W . Biederman" , Miklos Szeredi , Seth Forshee , Sargun Dhillon , dm-devel@redhat.com, linux-bcache@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mtd@lists.infradead.org, Alexander Viro , Jan Kara , Serge Hallyn Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1489 Lines: 48 Hi, On Fri, Dec 22, 2017 at 7:59 PM, Coly Li wrote: > On 22/12/2017 10:32 PM, Dongsu Park wrote: > Hi Dongsu, > > Could you please use a macro like NO_PERMISSION_CHECK to replace hard > coded 0 ? At least for me, I don't need to check what does 0 mean in the > new lookup_bdev(). I see. I'll do that. Thanks, Dongsu > Thanks. > > Coly Li > >> --- >> drivers/md/bcache/super.c | 2 +- >> drivers/md/dm-table.c | 2 +- >> drivers/mtd/mtdsuper.c | 2 +- >> fs/block_dev.c | 13 ++++++++++--- >> fs/quota/quota.c | 2 +- >> include/linux/fs.h | 2 +- >> 6 files changed, 15 insertions(+), 8 deletions(-) >> >> diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c >> index b4d28928..acc9d56c 100644 >> --- a/drivers/md/bcache/super.c >> +++ b/drivers/md/bcache/super.c >> @@ -1967,7 +1967,7 @@ static ssize_t register_bcache(struct kobject *k, struct kobj_attribute *attr, >> sb); >> if (IS_ERR(bdev)) { >> if (bdev == ERR_PTR(-EBUSY)) { >> - bdev = lookup_bdev(strim(path)); >> + bdev = lookup_bdev(strim(path), 0); >> mutex_lock(&bch_register_lock); >> if (!IS_ERR(bdev) && bch_is_open(bdev)) >> err = "device already registered"; >> diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c >> index 88130b5d..bca5eaf4 100644 > [snip] > > > -- > Coly Li