From patchwork Fri May 20 20:48:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miklos Szeredi X-Patchwork-Id: 9130043 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 E233760772 for ; Fri, 20 May 2016 20:48:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D907627CC9 for ; Fri, 20 May 2016 20:48:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CE0F927D10; Fri, 20 May 2016 20:48:41 +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=-6.9 required=2.0 tests=BAYES_00,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 86FE527E3D for ; Fri, 20 May 2016 20:48:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751543AbcETUsh (ORCPT ); Fri, 20 May 2016 16:48:37 -0400 Received: from mail-wm0-f42.google.com ([74.125.82.42]:36403 "EHLO mail-wm0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751209AbcETUse (ORCPT ); Fri, 20 May 2016 16:48:34 -0400 Received: by mail-wm0-f42.google.com with SMTP id n129so287069339wmn.1 for ; Fri, 20 May 2016 13:48:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=WcsJH9544Z0HJ+gW+k6eqmLEG5Vk0Qj/N5aUMJ67t7Q=; b=gebwa0UbrdXKB6NfIYRt00MXcGFqQbL3UJ3YePJtxx67jrdaKPasg8CGb5taSSUIgc x3Uc6894DFBP3U0cFCnzYZBeLiXOT/Us9PfQSA5aZ+Xg7RhHKuKqg6mrWw15gno/mqZr pif6QjuQEGZPv7wJxT6gWaKb8YCy6ESJ0yxMeCPumbiOnOVF/mVxu690DkeiQod5zw5D 8mlPAhU1T/nYwJEf9lgTZCrb6cmIchKgGRsFaif39aKNVuhOp37jf8cw5s4S3iM5mWud 48ydDWXkzlojn4e2SJz3dPEbhl+O9RomjhKHXjKNxnCx6I6NAU+RPTBBtenx7TNc2RDX jVrA== X-Gm-Message-State: AOPr4FUFKJkbpztPLCzgJhrWgZHmH1BTaCAzXAaK4tB0cIHWPCHirAw33dhZP3glTm5LuGP5 X-Received: by 10.194.32.199 with SMTP id l7mr5179669wji.137.1463777312138; Fri, 20 May 2016 13:48:32 -0700 (PDT) Received: from veci.piliscsaba.szeredi.hu (pool-dsl-2c-0018.externet.hu. [217.173.44.24]) by smtp.gmail.com with ESMTPSA id s125sm6294210wms.14.2016.05.20.13.48.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 May 2016 13:48:31 -0700 (PDT) From: Miklos Szeredi To: Al Viro Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, David Howells Subject: [PATCH 1/2] vfs: add d_real_inode() helper Date: Fri, 20 May 2016 22:48:09 +0200 Message-Id: <1463777290-22881-2-git-send-email-mszeredi@redhat.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1463777290-22881-1-git-send-email-mszeredi@redhat.com> References: <1463777290-22881-1-git-send-email-mszeredi@redhat.com> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Needed by the following fix. Signed-off-by: Miklos Szeredi Cc: --- include/linux/dcache.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 7e9422cb5989..ad5d582f9b14 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h @@ -576,5 +576,17 @@ static inline struct inode *vfs_select_inode(struct dentry *dentry, return inode; } +/** + * d_real_inode - Return the real inode + * @dentry: The dentry to query + * + * If dentry is on an union/overlay, then return the underlying, real inode. + * Otherwise return d_inode(). + */ +static inline struct inode *d_real_inode(struct dentry *dentry) +{ + return d_backing_inode(d_real(dentry)); +} + #endif /* __LINUX_DCACHE_H */