Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1650954imm; Thu, 12 Jul 2018 05:44:56 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcyWusE7mYGHJ1KsQuIgdvYzo0rjfcb3+1KiPmaXlp247K5S2I9dag0/p2+mpi1FyLPGH5F X-Received: by 2002:a63:f002:: with SMTP id k2-v6mr1984210pgh.8.1531399496761; Thu, 12 Jul 2018 05:44:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531399496; cv=none; d=google.com; s=arc-20160816; b=adMnbuZLDYIHgMm2/LERqz+Amqnz44MQHVZjL9YAPVF+/DwFlY2yAUVfzGTk4DlbAD aRhsjgvfgvocXD10RKDNIc/ae5ZcKzzthvjlc3Q3UNRTzdsFS2+2Ik2g/OuichV9R5fr Lbc+WcZzMql+8H72T/e9BelL7eMDI3sXBRaVQZ1dshBo3QkS3CrY1PWbJ6eyA6hTJpX7 1PWPNQXH5MokN9eKRVThDUoihqAaL1VP+gKmpHwXxom6Hk2GnHKLHxGF0S/U5YmAafr3 I++8H2xqvdMI1RefPDXwTTDdcprGUA2RrpCBLPQ4NuTJhOuUcqko57McdpaqtQ+Rnvwv zK7g== 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=bbl1GG1zk9xBdlk4e0yfLLUYrozREWDXc7ahmH+USak=; b=iZHRJhmCzqMPp+mzdlOkgEwiYQOSPfKpv386PHGX0oFXcF+OTTKNx6140C2wG6NmEI MGHD+Ta0nVzVoTaG0XVwtg0g7xk22YsUffcnpCJ8N5FcpQ6lDNw/noCJybVNMEEg5pFd 9nIzeRpmQMVvcBYDb8jMuT8+hg0WJrtkO55k82x47Y3WdQZqZjCZimjdtplg6fDZo09g VpwytlvlYSv7tC9JXctBnR6Hv3n422ZRP94myu9qziEHFybs7SCM8V3JEJgp0Fs54iyA l04BhJOHSu+Z7QLsCvt0mfHo7h+kp7YwFLk3rxpFsJt9kQmdF0j91tEnj1G5QPz7FPSd Dm/g== 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 l192-v6si4847463pge.81.2018.07.12.05.44.41; Thu, 12 Jul 2018 05:44:56 -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 S1732401AbeGLMww (ORCPT + 99 others); Thu, 12 Jul 2018 08:52:52 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:34646 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726812AbeGLMww (ORCPT ); Thu, 12 Jul 2018 08:52:52 -0400 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.87 #1 (Red Hat Linux)) id 1fdawQ-0005AW-HK; Thu, 12 Jul 2018 12:43:26 +0000 Date: Thu, 12 Jul 2018 13:43:26 +0100 From: Al Viro To: Linus Torvalds Cc: linux-fsdevel , Linux Kernel Mailing List , Miklos Szeredi Subject: Re: [RFC][PATCH 01/42] drm_mode_create_lease_ioctl(): fix open-coded filp_clone_open() Message-ID: <20180712124326.GA19272@ZenIV.linux.org.uk> References: <20180711021136.GN30522@ZenIV.linux.org.uk> <20180711022206.12571-1-viro@ZenIV.linux.org.uk> <20180711152555.GR30522@ZenIV.linux.org.uk> <20180711161540.GS30522@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180711161540.GS30522@ZenIV.linux.org.uk> 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 Wed, Jul 11, 2018 at 05:15:40PM +0100, Al Viro wrote: > Actually, looking at the entire thing, I'm rather tempted to go for > alloc_empty_file(f_flags, cred) > setting both f_flags and f_flags-derived part of f_mode, making > alloc_file_pseudo(inode, mnt, name, f_flags, ops) > alloc_file_clone(base, f_flags, ops) > do the same automatically as they call alloc_empty_file(). See vfs.git#work.open3; one commit added just before "pass creds to get_empty_filp(), make sure dentry_open() passes the right creds", one just after. The first one ("alloc_file(): switch to passing O_... flags instead of FMODE_... mode") pulls ->f_flags assignments into preceding alloc_file(), the second ("pass ->f_flags value to alloc_empty_file()") makes alloc_empty_file() set ->f_flags and ->f_flags-derived part of ->f_mode, with do_dentry_open() leaving these parts of ->f_mode alone. The rest is pretty much identical to the previous iteration of the series, except that alloc_file wrappers inherit the switch to passing O_... A question regarding the customs in such situations - are previous Reviewed-by/Acked-by normally kept across rebases like that?