Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp504478imn; Fri, 29 Jul 2022 13:51:20 -0700 (PDT) X-Google-Smtp-Source: AA6agR76W7CaUupt5VQrmLMfgCmjhhkAQ08fr+55nrUsY7zfrCj/gV23R8NFTHgxB5fuTJiJTVUr X-Received: by 2002:a17:902:ef47:b0:16c:60df:3a7c with SMTP id e7-20020a170902ef4700b0016c60df3a7cmr5509239plx.9.1659127880435; Fri, 29 Jul 2022 13:51:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659127880; cv=none; d=google.com; s=arc-20160816; b=g0Bx5e18KrsnePvzDnm5vVIkMil0O5ZllVASlvxCPmV/AnzSoeT6YXEl4WuqfQDqs+ ACPyZZ/h8XSYf4wdj2s++ANNurL+eAO9ypkKwnWCs+PRKV4Ouz+pbBUl3nqR8ErPGtat 55iWo7Ps+1UXZMnZ/1T0WSrIlrnE9wt7zF35Q4cmigGiisA5Ik5Ff2BusAr2HQGtFpew XdWjnDwMSEAHzYcw0ScXEqWyDVHUHG2n0gxS17ckHEe3raVRzbfv7/7j+JWmrYT5+3jR cfbBi2dziGBVAPuXdevxMh07tupmrHC1WCpndJTRtw4dYmh1ed0CoACgurdrivXdDqr1 ao0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=bD2SiMlD4xD+BqEtfLLnVfvqTe1uoHgWXGwb6/5GECc=; b=hFJ+Y++BshFcDxd/bGM2IbxigjU3GOpJS943n9WmW9iqTVm3PRjP4q92hslqqCT8q5 6Fy7bC6h62t2jMOs1M4AFH9/X4iKbNu2oYrTo3WsLwpOzR3lTJxhdnVa6HAvLi984dTL MRiVgPOpW0mhgeZv/n/CX3F19brZBG66ynYBD3NeebYHhw8DZOicuxTqxYVFudcfYJfj HM7l8HFWBM1H0hDAaYvLagTF4gbNVRRonct/MQgmPRezM2SqBdyFb9pouwosJz0hYz9T PGUk8lcISSJq194GiGD2G75xXUumwpSPZHr8EcGa/sZScSvx4qBrwKNN4xRDetqv8SOJ ANHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QGnWyPiu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f8-20020a655908000000b004157aa8707csi5429427pgu.110.2022.07.29.13.51.06; Fri, 29 Jul 2022 13:51:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QGnWyPiu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230518AbiG2Urq (ORCPT + 99 others); Fri, 29 Jul 2022 16:47:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230089AbiG2Uro (ORCPT ); Fri, 29 Jul 2022 16:47:44 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3159F6A4B6 for ; Fri, 29 Jul 2022 13:47:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1659127662; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=bD2SiMlD4xD+BqEtfLLnVfvqTe1uoHgWXGwb6/5GECc=; b=QGnWyPiuVbzugGmvr6QnBg+b7dg/iU6fTwq710Mi+UNVPiUjKReIc5GusLUWWz7IA4D6Ly iyssrVsAB8Re7DFYMpJCH/EdsXXhOVHJBwjImtij5sAVO1jbt2u2+49VowCWuPokZHUsaq lMJFhE5HU9eXcMG7wN0at6L0BZqxR1s= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-617-W4q5IP3nPqu8r8KnJDNhcA-1; Fri, 29 Jul 2022 16:47:38 -0400 X-MC-Unique: W4q5IP3nPqu8r8KnJDNhcA-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 41591380451F; Fri, 29 Jul 2022 20:47:38 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.40.192.26]) by smtp.corp.redhat.com (Postfix) with SMTP id E89E51121314; Fri, 29 Jul 2022 20:47:35 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Fri, 29 Jul 2022 22:47:35 +0200 (CEST) Date: Fri, 29 Jul 2022 22:47:32 +0200 From: Oleg Nesterov To: "Eric W. Biederman" Cc: Tycho Andersen , "Serge E. Hallyn" , Miklos Szeredi , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Al Viro Subject: Re: [RFC][PATCH] fuse: In fuse_flush only wait if someone wants the return code Message-ID: <20220729204730.GA3625@redhat.com> References: <20220727191949.GD18822@redhat.com> <20220728091220.GA11207@redhat.com> <87pmhofr1q.fsf@email.froward.int.ebiederm.org> <87v8rfevz3.fsf@email.froward.int.ebiederm.org> <87h72zes14.fsf_-_@email.froward.int.ebiederm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87h72zes14.fsf_-_@email.froward.int.ebiederm.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/29, Eric W. Biederman wrote: > > +static int fuse_flush_async(struct file *file, fl_owner_t id) > +{ > + struct inode *inode = file_inode(file); > + struct fuse_mount *fm = get_fuse_mount(inode); > + struct fuse_file *ff = file->private_data; > + struct fuse_flush_args *fa; > + int err; > + > + fa = kzalloc(sizeof(*fa), GFP_KERNEL); > + if (!fa) > + return -ENOMEM; > + > + fa->inarg.fh = ff->fh; > + fa->inarg.lock_owner = fuse_lock_owner_id(fm->fc, id); > + fa->args.opcode = FUSE_FLUSH; > + fa->args.nodeid = get_node_id(inode); > + fa->args.in_numargs = 1; > + fa->args.in_args[0].size = sizeof(fa->inarg); > + fa->args.in_args[0].value = &fa->inarg; > + fa->args.force = true; > + fa->args.end = fuse_flush_end; > + fa->inode = inode; > + __iget(inode); Hmm... who does iput() ? Oleg.