From patchwork Tue May 29 14:43:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miklos Szeredi X-Patchwork-Id: 10436127 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 0429760327 for ; Tue, 29 May 2018 15:14:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EA0C7287F9 for ; Tue, 29 May 2018 15:14:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DED5B2885C; Tue, 29 May 2018 15:14:37 +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 83DE5287F9 for ; Tue, 29 May 2018 15:14:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935287AbeE2POf (ORCPT ); Tue, 29 May 2018 11:14:35 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:34635 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935596AbeE2On5 (ORCPT ); Tue, 29 May 2018 10:43:57 -0400 Received: by mail-wm0-f66.google.com with SMTP id q4-v6so29306833wmq.1 for ; Tue, 29 May 2018 07:43:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=neX9krispjP/8cHkLbwcM+GDHx2mCIZyMpSm8yIAbOw=; b=RqQ+ASe6gKyypsDWAHZfi6Crw9y5SNqerXPv49pG28JJg41hmDhWJKtRKJW//rhr9T ZyCMElRIHjZob5MVamJyvZt6sGt+rrWbx+Lettlrb/K35Oa1ttudVbf5/sB57jiO2Vfz ha1mXxFYcz2c3F7RV00TcRtvt0kJSwVHW4PHp1H8gKN2J7zKO6FBO02WIyL5drwF86L8 0/7kEWyoZidvyShp4s14SFz8gdgiY25XusBrPMoTPMlemR5/3UXyxEP0/YHMTcL7ydt3 yWnLztaSE74z6qNIaoICMONoMOOuY7R8T29vRb+Bq1Sa7yfGhCc8eirzdZ1y6akcHyk8 IFTQ== X-Gm-Message-State: ALKqPwcQCz/BWOBlAC13XK5RD2sTs8BUCjwOaKLMDu52/AKKirVyIthH fRjdN0bKqP+8SZERcf6gL8Qj/w== X-Google-Smtp-Source: ADUXVKJlJ5XIbA5giP28FrR4qUjBdZapoaXQXFP5youWW5OWcGuWZlf/gGxRAhU83TB3Jre/wRXQKg== X-Received: by 2002:a1c:b586:: with SMTP id e128-v6mr5619033wmf.121.1527605036651; Tue, 29 May 2018 07:43:56 -0700 (PDT) Received: from veci.piliscsaba.redhat.com (catv-176-63-54-97.catv.broadband.hu. [176.63.54.97]) by smtp.gmail.com with ESMTPSA id t198-v6sm18834422wmt.23.2018.05.29.07.43.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 29 May 2018 07:43:56 -0700 (PDT) From: Miklos Szeredi To: linux-unionfs@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 13/39] ovl: deal with overlay files in ovl_d_real() Date: Tue, 29 May 2018 16:43:13 +0200 Message-Id: <20180529144339.16538-14-mszeredi@redhat.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180529144339.16538-1-mszeredi@redhat.com> References: <20180529144339.16538-1-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 Signed-off-by: Miklos Szeredi --- fs/overlayfs/super.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c index 704b37311467..211975921a90 100644 --- a/fs/overlayfs/super.c +++ b/fs/overlayfs/super.c @@ -97,6 +97,10 @@ static struct dentry *ovl_d_real(struct dentry *dentry, struct dentry *real; int err; + /* It's an overlay file */ + if (inode && d_inode(dentry) == inode) + return dentry; + if (flags & D_REAL_UPPER) return ovl_dentry_upper(dentry);