Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp3623358ybf; Tue, 3 Mar 2020 09:16:13 -0800 (PST) X-Google-Smtp-Source: ADFU+vtJ9e/CBxA4UKLg2so6zecvac3Q26bVe1NCPkHXFHy3kUMlnEAPPpgtzO1UqKNeMKCAbdYS X-Received: by 2002:a05:6808:298:: with SMTP id z24mr2978735oic.101.1583255773621; Tue, 03 Mar 2020 09:16:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583255773; cv=none; d=google.com; s=arc-20160816; b=QOb/xDupgQTnPR3x45KjlUuzOhDLZi47Qn3rZw1xkTFW3+Ji6v/decDD/0E0+GvGHj QRqz2dmo8XLeX2HHlqAm//4IUfZecseEkFMW3Wp43C/T27E9tkRlp/7q4hNCPPbWKAbe pHMLSTOFk51knw1f+gsrL/fWKOi6xjkciH7i2fiPPpj93n3wOT8iLbpo6WhgNcHKvJ1y XXQXAsgyP/e0+qjcVhJVnBQwe+a/jZKP/uFe2oR+gmMd1Hz084ydt2KNOOjJG5hDZmXo FeEyEoHtp+h/4/y+9nb6dwfWKSVvwYzczPWNc6WJqa8rn17MFJTEB6ecRS/H//fIIVqm Mn7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=6G04ioM9x4jiN4BtimhWD9d1+ou+Uq9o+70eVwvV2NI=; b=JJ1qW+HKJ2/ftm46md0fPHSjsXcgtOKMtovPrfUSq5Or594ow4dskuYdb3CGDjETL1 niYaVDX5dbhAVeuoWKNwbMAke8A26osXU8S/HC9JCCBA1olnS6fD2lH1gSzBet1dXC5l 8c2LsUxE5MY6tZqNUh7/ikuDvmcMaqbZmDSbKOWFiSAo+2rUEwr30FEKAkdTZhRhFNee wIjjhyoPdMwo7lGWbexbnOqC8y46uw/pwCI6lecmiYShRT2MpXpMqiBeUzK67oVdO05x vvhvFjH5Y+6qFhCYW4bpzcblfH6pGevIcBhBADYr+fkpQYv48seUIjBgUkrL6cxczbxe t0aA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=WLx1pz6X; 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 o2si8849860otj.312.2020.03.03.09.15.57; Tue, 03 Mar 2020 09:16:13 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b=WLx1pz6X; 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 S1730486AbgCCQ7G (ORCPT + 99 others); Tue, 3 Mar 2020 11:59:06 -0500 Received: from mail.kernel.org ([198.145.29.99]:56450 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727077AbgCCQ7G (ORCPT ); Tue, 3 Mar 2020 11:59:06 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C7E5F20836; Tue, 3 Mar 2020 16:59:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583254745; bh=8H4Wakgj410FWowFma4sZ8OJz0IncW+GkyXmfanmzcs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=WLx1pz6X82LxTVq7p5k1+0WQDu3UvgzzpWFYsCmLOgvqglB1Dvseap0+302bD3p4o i9a8dehqjhhNV1J2tsfJdy6TyvUIQTNzHHfrVesWYUpaf+T1Ac9CuMNfYRJY5UlXMQ IpKrUrAXnlwTNkMNESxu1GaWnaaf5whO38uzaMfI= Date: Tue, 3 Mar 2020 17:59:03 +0100 From: Greg Kroah-Hartman To: David Howells Cc: Miklos Szeredi , Karel Zak , Ian Kent , Christian Brauner , James Bottomley , Steven Whitehouse , Miklos Szeredi , viro , Christian Brauner , Jann Horn , "Darrick J. Wong" , Linux API , linux-fsdevel , lkml Subject: Re: [PATCH 00/17] VFS: Filesystem information and notifications [ver #17] Message-ID: <20200303165903.GA779378@kroah.com> References: <0403cda7345e34c800eec8e2870a1917a8c07e5c.camel@themaw.net> <1509948.1583226773@warthog.procyon.org.uk> <20200303113814.rsqhljkch6tgorpu@ws.net.home> <20200303130347.GA2302029@kroah.com> <20200303131434.GA2373427@kroah.com> <20200303134316.GA2509660@kroah.com> <1657843.1583245198@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1657843.1583245198@warthog.procyon.org.uk> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 03, 2020 at 02:19:58PM +0000, David Howells wrote: > Greg Kroah-Hartman wrote: > > > + fd = do_sys_open(dfd, filename, flags, 0000); > > + if (fd <= 0) > > + return fd; > > + > > + retval = ksys_read(fd, buffer, bufsize); > > + > > + __close_fd(current->files, fd); > > If you can use dentry_open() and vfs_read(), you might be able to avoid > dealing with file descriptors entirely. That might make it worth a syscall. Will poke at that... > You're going to be asked for writefile() you know ;-) Yup, that just got asked on this thread already :) greg k-h