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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C5920C43334 for ; Wed, 1 Jun 2022 19:44:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229716AbiFAToJ (ORCPT ); Wed, 1 Jun 2022 15:44:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229577AbiFAToI (ORCPT ); Wed, 1 Jun 2022 15:44:08 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32D3C1C422A; Wed, 1 Jun 2022 12:43:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=BHZbbhlnwWZ69g/BbqnWHLaBADjVX+Zh/qnzxYzNDO0=; b=ZNJxRbKgkoPIU1PbhayK20lWOc zOSaeGjel+0cbGqgoSDF11BVPSMGnRo8bprJpkGZ2+dJtXT2naYo3XMWNtJmWTSHzYNI/4nvtN/Lr VsXtpggm5OqGtC/wucz4NIl3gjx0JHwtsUE+kPP/doftwrxGhsJNAJOULb8nBEI3/8xzjqC+hBEtx cJSyr0Gc7Fh2FH7QVhUIcOXwrbc7suIjM+CMImaLrBCGtFcA5LgII3aIWcQyMor0+aWBMDQ/WDv3Z ks8YO6RtOc1uaI3LGcnKTMzKBBdn5NPc+AU7hIJH1jQh6tTdoo3uYMah2s8KsGMUmubimxRXN5/tN CcK/NSLA==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nwTsA-006XqD-2w; Wed, 01 Jun 2022 19:19:14 +0000 Date: Wed, 1 Jun 2022 20:19:14 +0100 From: Matthew Wilcox To: Alexey Gladkov Cc: LKML , "Eric W . Biederman" , Linus Torvalds , Andrew Morton , Christian Brauner , Iurii Zaikin , Kees Cook , Linux Containers , linux-fsdevel@vger.kernel.org, Luis Chamberlain , Vasily Averin Subject: Re: [RFC PATCH 1/4] sysctl: API extension for handling sysctl Message-ID: References: <5ec6759ab3b617f9c12449a9606b6f0b5a7582d0.1654086665.git.legion@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5ec6759ab3b617f9c12449a9606b6f0b5a7582d0.1654086665.git.legion@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 01, 2022 at 03:20:29PM +0200, Alexey Gladkov wrote: > +struct ctl_fops { > + int (*open) (struct ctl_context *, struct inode *, struct file *); > + int (*release) (struct ctl_context *, struct inode *, struct file *); > + ssize_t (*read) (struct ctl_context *, struct file *, char *, size_t *, loff_t *); > + ssize_t (*write) (struct ctl_context *, struct file *, char *, size_t *, loff_t *); > +}; Why not pass the iocb in ->read and ->write? We're still regretting not doing that with file_operations.