Received: by 10.192.165.148 with SMTP id m20csp3077225imm; Mon, 7 May 2018 06:19:00 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrLbH3zrFV8Rp9xLiGiP6YSNhRNXSCeqgHsqci+W/vz8DtVpuZvT009qBrW9oMEQxbst/f1 X-Received: by 2002:a63:90c4:: with SMTP id a187-v6mr29967394pge.189.1525699140389; Mon, 07 May 2018 06:19:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525699140; cv=none; d=google.com; s=arc-20160816; b=o0ukohYEIi0Es7M4QJL4ghlLtczWgvGFyt95B90GioQlt1eK/V0g8JqVjbCvMR2lSN kdnpTlZSrn5cL/PVmGni55kUFt7R/anNASgX+nwxX9I+HHTiqEbIq/GVmZ5eWXATjOWd BfaNp8XHVwvHDpXx73qIS3S0/pqlbcafQDlfXVXXpl6IPlazB/5+GyDodF9iVz7bz2Yb VgyBf9LQxelXBL/8UnP2Etm5i92Bl4bpPyg/kG0v+gZBqAvv9sA+xJF94KOMHDOZ2W+I dK/7mIEbX6dSMT1lMzlJ04oZwNaVV3uC3j4Vl0IwujsKdm+W8pzQq3dwS9d5TpFKyCko PYjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=R50R1qpI+VWs+5IV0E9OCYMR3LvJOmTz4o/Jbunfwg0=; b=0Mki9AwJ9yjJrAYnwq7dgOocW84et/zDkbgjKGP4dCZf4UhoVAJ2vk/ea9ybfMMcv5 k41lYIU3kehg4N728zgJdOxTeaWqsY6dwRw8oJDQbLtGDI2A6aLu6C/xQuguD7YrgcEd NxCn6rseLeykuw086WwbNxsoGLggbctcpPfxmrHLKQYPQHDmpHjBoRL3DdCGkf2fv/1d yIlX0U3JAJh73/jq1lWAcThnTy1wUR2uOBS/MmE3xKatN9NayQ0x2vQwyMpzEwiDJL3U P16Dj6Q6atfnaQgffWp6JZzL0R5fOmSLjg7Fx+f/E+kvxeKfqagXTsUWggw6sFQWnsdA 7ilw== 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 i5-v6si17738884pgc.331.2018.05.07.06.18.45; Mon, 07 May 2018 06:19:00 -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 S1752457AbeEGNRT (ORCPT + 99 others); Mon, 7 May 2018 09:17:19 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:55798 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752051AbeEGNRR (ORCPT ); Mon, 7 May 2018 09:17:17 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 356454040073; Mon, 7 May 2018 13:17:17 +0000 (UTC) Received: from horse.redhat.com (unknown [10.18.25.159]) by smtp.corp.redhat.com (Postfix) with ESMTP id 25C4A215CDA7; Mon, 7 May 2018 13:17:17 +0000 (UTC) Received: by horse.redhat.com (Postfix, from userid 10451) id D3EA12237C0; Mon, 7 May 2018 09:17:16 -0400 (EDT) Date: Mon, 7 May 2018 09:17:16 -0400 From: Vivek Goyal To: Miklos Szeredi Cc: linux-unionfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 10/35] ovl: deal with overlay files in ovl_d_real() Message-ID: <20180507131716.GA18454@redhat.com> References: <20180507083807.28792-1-mszeredi@redhat.com> <20180507083807.28792-11-mszeredi@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180507083807.28792-11-mszeredi@redhat.com> User-Agent: Mutt/1.9.1 (2017-09-22) X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Mon, 07 May 2018 13:17:17 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Mon, 07 May 2018 13:17:17 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'vgoyal@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 07, 2018 at 10:37:42AM +0200, Miklos Szeredi wrote: > 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; > + Hi Miklos, inode == d_inode(dentry) check is being done again in following code. We probably can get rid of it now. if (!d_is_reg(dentry)) { if (!inode || inode == d_inode(dentry)) return dentry; goto bug; } Vivek > if (flags & D_REAL_UPPER) > return ovl_dentry_upper(dentry); > > -- > 2.14.3 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-unionfs" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html