Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751828AbdIOOHj (ORCPT ); Fri, 15 Sep 2017 10:07:39 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:34322 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751259AbdIOOHh (ORCPT ); Fri, 15 Sep 2017 10:07:37 -0400 Date: Fri, 15 Sep 2017 15:07:34 +0100 From: Al Viro To: Miklos Szeredi Cc: Linus Torvalds , Linux Kernel Mailing List , linux-fsdevel , "linux-unionfs@vger.kernel.org" Subject: Re: [experimental PATCH] ovl: get rid of d_real() Message-ID: <20170915140734.GY5426@ZenIV.linux.org.uk> References: <20170915135805.GD19278@veci.piliscsaba.szeredi.hu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170915135805.GD19278@veci.piliscsaba.szeredi.hu> User-Agent: Mutt/1.8.3 (2017-05-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 547 Lines: 11 On Fri, Sep 15, 2017 at 03:58:05PM +0200, Miklos Szeredi wrote: > And here's the prototype. Poof, d_real() is gone. > > It definitely has got problems, but just maybe it can be made better than the > current mess. It *does* solve the ro-rw inconsistency for normal reads (not > mmaps). ... and makes for mind-boggling amount of opening/closing the files on underlying filesystem. Doing that on sodding ->read_iter() is simply wrong. And you are using the wrong credentials for those opens, anyway - it should be creds of opener, not reader.