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=-2.1 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 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 E6A03C32750 for ; Tue, 13 Aug 2019 08:48:15 +0000 (UTC) Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B683E206C2; Tue, 13 Aug 2019 08:48:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sourceforge.net header.i=@sourceforge.net header.b="ZzUOHCGz"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sf.net header.i=@sf.net header.b="bAP+9pym"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="YExtdyLD" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B683E206C2 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-f2fs-devel-bounces@lists.sourceforge.net Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1hxSTX-0000hT-3y; Tue, 13 Aug 2019 08:48:15 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1hxSTW-0000hG-F1; Tue, 13 Aug 2019 08:48:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; 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:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=n3/8TUe+n+Zyvqt0DSbtNQWNdCnN3TcL5cKi2ymUug0=; b=ZzUOHCGz+9hqhML0Ls9LAyVzd7 zQEcB86l2I+851iJsKTo+Y8eu/pBYZRxYBhdvZZb+G0JkFhJ/DWeDxhJcF6h0mbdKjEWFSfdJOLRf 4lvCU25Y7LV7yKwySvBDkNJwkLiHHF6Lj7qykl/bOHjxUrebDNTkxCyMTJtfi9j09GZA=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; 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:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=n3/8TUe+n+Zyvqt0DSbtNQWNdCnN3TcL5cKi2ymUug0=; b=bAP+9pymo6+G5mrOD4c+eK/znS W2F6L7fsPcto3AjTo4mpMEpQiX+6Qe1QzQxULm+H+HXe21Q6yaSxir5EbpTYESedoW7nu2o7kLG5G w2Q348VUL3UID3HxwYY/rBJTu9E/gRMaQge4HApRmiIi9S87iOp8CSmYUiBqgdmqD3Io=; Received: from mail.kernel.org ([198.145.29.99]) by sfi-mx-4.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) id 1hxSTS-001zjr-8W; Tue, 13 Aug 2019 08:48:14 +0000 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 4E6C720679; Tue, 13 Aug 2019 08:48:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565686084; bh=dgkNfsoGvEEUqkSMoKhZo00QGi0KOqUYD1qh2seiDX0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=YExtdyLDmV5g6i2jgGccJIQ9lpJD2qunpsOWx/skQdmvZBvdutmEsdbbDFgUnYiW9 lXvB0C/oMwnRrAFZnyypCC3r55bOvbM5/MOv8GxdUmBrJYIbb3l/0Xsrf+14ZRwh2E PJJHiAbOF9zt2xlZLKfEtULVL5ySMo91nAG/3xII= Date: Tue, 13 Aug 2019 10:48:01 +0200 From: Greg Kroah-Hartman To: Mark Salyzyn Message-ID: <20190813084801.GA972@kroah.com> References: <20190812193320.200472-1-salyzyn@android.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190812193320.200472-1-salyzyn@android.com> User-Agent: Mutt/1.12.1 (2019-06-15) X-Headers-End: 1hxSTS-001zjr-8W Subject: Re: [f2fs-dev] [PATCH] Add flags option to get xattr method paired to __vfs_getxattr X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Latchesar Ionkov , Dave Kleikamp , jfs-discussion@lists.sourceforge.net, linux-integrity@vger.kernel.org, Martin Brandenburg , samba-technical@lists.samba.org, Dominique Martinet , Mimi Zohar , linux-unionfs@vger.kernel.org, David Howells , Chris Mason , "David S. Miller" , Andreas Dilger , Eric Paris , netdev@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-afs@lists.infradead.org, Mike Marshall , linux-xfs@vger.kernel.org, Andreas Gruenbacher , Sage Weil , Miklos Szeredi , Richard Weinberger , Mark Fasheh , Hugh Dickins , James Morris , cluster-devel@redhat.com, selinux@vger.kernel.org, Vyacheslav Dubeyko , Casey Schaufler , v9fs-developer@lists.sourceforge.net, Ilya Dryomov , linux-ext4@vger.kernel.org, kernel-team@android.com, linux-mm@kvack.org, devel@lists.orangefs.org, Serge Hallyn , Ernesto =?iso-8859-1?Q?A=2E_Fern=E1ndez?= , linux-cifs@vger.kernel.org, Eric Van Hensbergen , ecryptfs@vger.kernel.org, Josef Bacik , reiserfs-devel@vger.kernel.org, Tejun Heo , Joel Becker , linux-mtd@lists.infradead.org, David Sterba , Jaegeuk Kim , ceph-devel@vger.kernel.org, Trond Myklebust , Paul Moore , linux-nfs@vger.kernel.org, Theodore Ts'o , linux-fsdevel@vger.kernel.org, Joseph Qi , Mathieu Malaterre , Stephen Smalley , "Darrick J. Wong" , Jeff Layton , linux-kernel@vger.kernel.org, stable@vger.kernel.org, Tyler Hicks , Steve French , linux-security-module@vger.kernel.org, ocfs2-devel@oss.oracle.com, Jan Kara , Bob Peterson , Phillip Lougher , Andrew Morton , David Woodhouse , Anna Schumaker , linux-btrfs@vger.kernel.org, Alexander Viro Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On Mon, Aug 12, 2019 at 12:32:49PM -0700, Mark Salyzyn wrote: > --- a/include/linux/xattr.h > +++ b/include/linux/xattr.h > @@ -30,10 +30,10 @@ struct xattr_handler { > const char *prefix; > int flags; /* fs private flags */ > bool (*list)(struct dentry *dentry); > - int (*get)(const struct xattr_handler *, struct dentry *dentry, > + int (*get)(const struct xattr_handler *handler, struct dentry *dentry, > struct inode *inode, const char *name, void *buffer, > - size_t size); > - int (*set)(const struct xattr_handler *, struct dentry *dentry, > + size_t size, int flags); > + int (*set)(const struct xattr_handler *handler, struct dentry *dentry, > struct inode *inode, const char *name, const void *buffer, > size_t size, int flags); Wow, 7 arguments. Isn't there some nice rule of thumb that says once you get more then 5, a function becomes impossible to understand? Surely this could be a structure passed in here somehow, that way when you add the 8th argument in the future, you don't have to change everything yet again? :) I don't have anything concrete to offer as a replacement fix for this, but to me this just feels really wrong... thanks, greg k-h _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel