Received: by 10.192.165.156 with SMTP id m28csp2095069imm; Thu, 12 Apr 2018 08:31:47 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+UWDlzPGLs3gpTCQZAinMvqk8Vm2L1WuNIBgTAYdhkOZajsIkEUx5pGJqtc5IjdkV68Rvd X-Received: by 2002:a17:902:b187:: with SMTP id s7-v6mr1566387plr.170.1523547107095; Thu, 12 Apr 2018 08:31:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523547107; cv=none; d=google.com; s=arc-20160816; b=jq4i+t9IxauJ8TPnDCqFM/E1TXsm08/3Nv5d4PGyblSBvdqFNJmx+ZRdMV1/wfpFVU oB7OWHREhuPBzYwu8AX9NC6MjYSCvhe5urfHVItbBV73A9FXCRTAey9rP3R/QZY+S0y1 5pjGWu9Z19JuViU340SvoqbN6CGGHQTufRUaEtaFyAxQWlRApyQtWspxG6aEzvrATHGW ixVhNC6bfMr5O1I+401IuosOSNZfn0EZcEtAUGPWLyVewD03a1BgBq/F7ILX+ZH4ptXE stA3anF6HBu0j5IwskpVOg1ZtM3jraGKZJTyvTzki4bWVppau0yjfX3GmBBJyD65s6hW zpoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=MSY2TNnMCcLRXSqy28uUaLmlSAv0j93cuKYvlDsE9SQ=; b=POdfR9Amky53ZvfWggwrJYR+uZyDmqt4ouQFsXuyeCkkgxrAQWYRlnt8vsaGiArhfb Z2Sbi7GIp9zTJBnK6BuuqRLD176kOhcCWepHrCqpilPQPA9v3EaWeDwhiIClrVI8VP6k +ZteLpxEyDIhRTd8c8Vfv9ZK6veXXcmD8Lr4TW2vJQsbFERQYGKzbMeDVo0dmInSXMcr FiLDMOrxIYIlXc2kFKPcUh7RXZlSMJx7z9I4TQyoJOyLfQmBx5aU96lEUkIFFsw2xT+s wyWQ2EJtsBB+LiGViBUVisq3dcOpKXgvsoOQ77JHYBpCoXZSfhQhgz2SjAB8eFjpalF+ AalA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p6si2438086pgv.11.2018.04.12.08.31.10; Thu, 12 Apr 2018 08:31:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753426AbeDLPXK (ORCPT + 99 others); Thu, 12 Apr 2018 11:23:10 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:37027 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753205AbeDLPIm (ORCPT ); Thu, 12 Apr 2018 11:08:42 -0400 Received: by mail-wr0-f196.google.com with SMTP id l49so5465353wrl.4 for ; Thu, 12 Apr 2018 08:08:41 -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=MSY2TNnMCcLRXSqy28uUaLmlSAv0j93cuKYvlDsE9SQ=; b=eqzWtURxUg+DV3dzxQvdXcq2t8eG7fpEZZUUUUB88MCCjyBuUP8WkWemgqIRt1a8vn 6Vdz/SdsHnLtBBy7+kRcxZ5rVov2gGWCNvQ3lPA2GRC4x3HpglnKbXrcp8+iwltJ0bXu lAJcbsHyA4PyEpr3VPDDNsNx4RE+jPRW+zsOmupTdrwTxKAPlI6zyGUPTLlEmVoBWvLV jvxcpa1vQXkqcRqVfMSOQOvfLmRMqul3rVFr2+9qr7tLlm9cOc5DKjZpWUfo22Sfgp8F c0Xyvzdz1RL8A8DKYcPo4Mw9yGazzPc+exd+weg0vv2UdXAUNd/R4u5eIM9UwrI68IxI r0Mg== X-Gm-Message-State: ALQs6tCyJ5uiXV7S0jLY2w6U0ABtcPKCneXC+o1ZifH812EX5TLJLouV eSMZB3oGXMaUzXPVlBbsIYPIKA== X-Received: by 10.223.192.136 with SMTP id d8mr1062267wrf.268.1523545721029; Thu, 12 Apr 2018 08:08:41 -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 p197sm2621783wme.43.2018.04.12.08.08.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 12 Apr 2018 08:08:40 -0700 (PDT) From: Miklos Szeredi To: linux-unionfs@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH 08/35] ovl: deal with overlay files in ovl_d_real() Date: Thu, 12 Apr 2018 17:07:59 +0200 Message-Id: <20180412150826.20988-9-mszeredi@redhat.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180412150826.20988-1-mszeredi@redhat.com> References: <20180412150826.20988-1-mszeredi@redhat.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 e8551c97de51..ad6a5baf226b 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); -- 2.14.3