From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0D604C3F2C6 for ; Tue, 3 Mar 2020 16:59:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D01A820838 for ; Tue, 3 Mar 2020 16:59:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583254748; bh=8H4Wakgj410FWowFma4sZ8OJz0IncW+GkyXmfanmzcs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=1POrpofQ/VWfAXjC00Qqdvo3aLb7Lku5wvwNv6sImgBuFwFJGbFEn2uRD/0Rfq5tP CyCQtRFE/c28RUlC4AirsJHSFhk8LE4wU1vho+kC41242ROyiPFbfNrWo5JEFanBcP gOWkeCtyGp9mFmUyVzwk4N15jaKRy4pl2A5RZaRg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730483AbgCCQ7G (ORCPT ); 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-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@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