Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp20137imm; Tue, 10 Jul 2018 20:00:52 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfi1qWuxqCg8K77hISmX1E3LSbftO/HrcMWHqVliKQe0Xn+oXgxnIjS21IkJxyZCovJk/RM X-Received: by 2002:a63:8648:: with SMTP id x69-v6mr24922208pgd.172.1531278052862; Tue, 10 Jul 2018 20:00:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531278052; cv=none; d=google.com; s=arc-20160816; b=EKNGMtebJ0TaUOQYZ8wIb0U4Zl4enB3eAjy5U7K7WxqI4C8SXOz1QzcVZpMk3l4zb+ dx4HL7TpWptKQ+C7z695k8U8ZhlZFyhwVyG1tfx2uLHnEiylMEMwK0ofZ4d+7wysnaNW oPqWjdmseyeOwOq8zFhkHQ1WMHMWxRkQCxdEI/AC7YqKirCusr5wZXdqMg7MvWNJJLhx n8V0twDBS0ZZEZxfT8RrGY1awpBkaZiwiC8UjVz9dAPrKlAHhHYAg/TG2NEVCsdnn+uf ErgHZvk8J2+CNac/CfkDKhgfkCi5UPi8svsBP5U1gi/RRvS6EtkGcpc1ojNxiXjcv3Uy vIdw== 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=zCqM8oI3+N39v7tzccYaBjS8iMIFvliy8pcLie7Xbq4=; b=FBY5JwGeiuhcLQlaDTlzzX2S1ry/mSvguf40aS/gsni24mH4CD2OftFgryoyut5HkD OcetuQNmjrQMCDC6BkFJfUEdsmM6Cwhwa4hESFUI4U4QBFXjilR9P/0kdtpIrxF8gwP1 FAzeqK7SHZOCX82b5ledtfIvtoEroHO6VERRj85qYYhC1UX95hjdvoT/dmAQ2aacf46o hvCKW6ht0+MO8nucKxUniIY70L61BZ7h+Spj0XTYqobWzehInIAn/Mofyrxgq6t3HQ/v +KnGV+bQ2aFvC/QLPcxtEZ8jKNcmrLkBwxf5q2ILPSFtw5iPncpeGHkk/MpsGaUViL+U hTLA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 78-v6si15434441pfn.205.2018.07.10.20.00.37; Tue, 10 Jul 2018 20:00:52 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732542AbeGKDB1 (ORCPT + 99 others); Tue, 10 Jul 2018 23:01:27 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:47622 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732316AbeGKDB1 (ORCPT ); Tue, 10 Jul 2018 23:01:27 -0400 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.87 #1 (Red Hat Linux)) id 1fd5Lc-0004Dl-KE; Wed, 11 Jul 2018 02:59:20 +0000 Date: Wed, 11 Jul 2018 03:59:20 +0100 From: Al Viro To: Linus Torvalds Cc: linux-fsdevel , Linux Kernel Mailing List , Miklos Szeredi Subject: Re: [RFC][PATCH 16/42] now we can fold open_check_o_direct() into do_dentry_open() Message-ID: <20180711025920.GQ30522@ZenIV.linux.org.uk> References: <20180711021136.GN30522@ZenIV.linux.org.uk> <20180711022206.12571-1-viro@ZenIV.linux.org.uk> <20180711022206.12571-16-viro@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 10, 2018 at 07:44:59PM -0700, Linus Torvalds wrote: > I like the patch, I hate the commit message. > > It makes sense right now in this sequence, but I'd really like the > commit message to say _why_ this sequence led up to this point. > > Right now I still remember you trying this, and having to revert it > because it didn't work before all the fput/put_filp issues. But a year > from now? Five years from now? > > So at least a "now that fput() works regardless of how far the open > got.." kind of explanation, ok? Umm... Something like These checks are better off in do_dentry_open(); the reason we couldn't put them there used to be that callers couldn't tell what kind of cleanup would do_dentry_open() failure call for. Now that we have FMODE_OPENED, cleanup is the same in all cases - it's simply fput(). So let's fold that into do_dentry_open(), as Christoph's patch tried to. perhaps?