From patchwork Tue May 8 18:04:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Fasheh X-Patchwork-Id: 10387149 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AFD066037F for ; Tue, 8 May 2018 18:26:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A621228555 for ; Tue, 8 May 2018 18:26:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9A6A929114; Tue, 8 May 2018 18:26:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4361428555 for ; Tue, 8 May 2018 18:26:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755747AbeEHSF7 (ORCPT ); Tue, 8 May 2018 14:05:59 -0400 Received: from mx2.suse.de ([195.135.220.15]:54115 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755721AbeEHSFz (ORCPT ); Tue, 8 May 2018 14:05:55 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 0E849AE08; Tue, 8 May 2018 18:05:54 +0000 (UTC) From: Mark Fasheh To: linux-fsdevel@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-btrfs@vger.kernel.org, Mark Fasheh Subject: [PATCH 46/76] fs/kernfs: Use inode_sb() helper instead of inode->i_sb Date: Tue, 8 May 2018 11:04:06 -0700 Message-Id: <20180508180436.716-47-mfasheh@suse.de> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180508180436.716-1-mfasheh@suse.de> References: <20180508180436.716-1-mfasheh@suse.de> Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Mark Fasheh --- fs/kernfs/dir.c | 4 ++-- fs/kernfs/inode.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/kernfs/dir.c b/fs/kernfs/dir.c index 89d1dc19340b..1239244e826a 100644 --- a/fs/kernfs/dir.c +++ b/fs/kernfs/dir.c @@ -1059,7 +1059,7 @@ static struct dentry *kernfs_iop_lookup(struct inode *dir, mutex_lock(&kernfs_mutex); if (kernfs_ns_enabled(parent)) - ns = kernfs_info(dir->i_sb)->ns; + ns = kernfs_info(inode_sb(dir))->ns; kn = kernfs_find_ns(parent, dentry->d_name.name, ns); @@ -1070,7 +1070,7 @@ static struct dentry *kernfs_iop_lookup(struct inode *dir, } /* attach dentry and inode */ - inode = kernfs_get_inode(dir->i_sb, kn); + inode = kernfs_get_inode(inode_sb(dir), kn); if (!inode) { ret = ERR_PTR(-ENOMEM); goto out_unlock; diff --git a/fs/kernfs/inode.c b/fs/kernfs/inode.c index a34303981deb..7b005800d815 100644 --- a/fs/kernfs/inode.c +++ b/fs/kernfs/inode.c @@ -173,7 +173,7 @@ static inline void set_default_inode_attr(struct inode *inode, umode_t mode) static inline void set_inode_attr(struct inode *inode, struct iattr *iattr) { - struct super_block *sb = inode->i_sb; + struct super_block *sb = inode_sb(inode); inode->i_uid = iattr->ia_uid; inode->i_gid = iattr->ia_gid; inode->i_atime = timespec_trunc(iattr->ia_atime, sb->s_time_gran);