Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp2706181rwe; Sun, 28 Aug 2022 20:28:53 -0700 (PDT) X-Google-Smtp-Source: AA6agR4bN/+MJatlsGlwtkxkvx8A0dY1nGnbaZPB3JHXf0IT00Ai84AC4K4E331oPyrUVF5R241A X-Received: by 2002:a05:6402:170f:b0:447:9293:234a with SMTP id y15-20020a056402170f00b004479293234amr14904048edu.373.1661743732744; Sun, 28 Aug 2022 20:28:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661743732; cv=none; d=google.com; s=arc-20160816; b=To2cWQ53TIztcdhoq86mj9U4V9FblPVO+fs4fFArV54t6GbsRAzrcv1tcEWZvC1ARp TZap9NmYQJdXXFcOtlLCW77rO415l07eEC6hOLt8kNQCvmf2cJDLEZytRgloB6bzInaP Lf6R91+mEPkUEhWHksndl6A5PwIROAztO3aYq5ox0FxHHiPQyCayeizXxeRzl9dY+afC EIE25plc/UVN9aBFho0mUNuR6v9x8DprxmS5/nUQuC+Pt82aPIeoM2Hc8h6uuvUTdd/H HeENrcc3nbi1WeSLjc4+n9Mx3WaXFxrrxQokFLFU84Ay0nYVn7zkxwOG/4lrB+dCaCuL Q/yQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:references:in-reply-to:subject :cc:to:from:mime-version:content-transfer-encoding:dkim-signature :dkim-signature; bh=f26RWbmfVsNehc6AfEHFnxY9Zicti3u2CzpcOTKnX1U=; b=zfuG74jNFMn4tHAx9E6uKlTsYOinlLhzZ5wFUCRzGNmn0trzZMPKb4CeK3XjLhscLh 6P6dw8VOtM8avyT763kW/LXxFlDZ4WyazuefP7oISoAzPy/MhQLKmNIgM9Yk2SM3rPIV SVInft5qJbZyT1h8g5fWGZM96W3B2o/mrF/qBqclb6L+KwCRYeusWOYG/AnVVKgkNlRh ssUGqD/kJ5+a7A+SbHY7HcukRkpEDXXJVlnBGm71wqEC3WzfCQ7Mut8oceBGJalGiA66 nJwOm8UnxhYSwLOxLf8p8ltqVfgVARcE5aeJBdJXoj6WEVHScC75axa2TKieOiyFXUT1 d2mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=xqZ1mIDU; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p9-20020a50cd89000000b00446cd5b771dsi6257090edi.223.2022.08.28.20.28.23; Sun, 28 Aug 2022 20:28:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-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=@suse.de header.s=susede2_rsa header.b=xqZ1mIDU; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229671AbiH2DNG (ORCPT + 99 others); Sun, 28 Aug 2022 23:13:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229743AbiH2DNF (ORCPT ); Sun, 28 Aug 2022 23:13:05 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4788817A8A; Sun, 28 Aug 2022 20:13:05 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id CD0C01FAA4; Mon, 29 Aug 2022 03:13:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1661742783; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=f26RWbmfVsNehc6AfEHFnxY9Zicti3u2CzpcOTKnX1U=; b=xqZ1mIDUJQ6aBwLK/HkmkxAAOMUssRnXtGUq841L2g47+DG/9Rs188TWBpanz0z+z6yHxN bKU/9CSBG/OadMnjEJr7d5+i8VPPnwzi2szu7lerwzmI7sX7eQO5H+mQVWjHuGG3d3Gck4 GxmCYeyy90vMER+1BYPh97qTsjdelm8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1661742783; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=f26RWbmfVsNehc6AfEHFnxY9Zicti3u2CzpcOTKnX1U=; b=WBGv3CrPPeptqETKZpF89+FgFT7gOLHDpu6tUbgyxGRmEZCQWbiNqdr9WZJEiu44UgDa71 uiBXSXinPz+Ak+Dg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 75808133A6; Mon, 29 Aug 2022 03:13:01 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id AKxIDb0uDGPBIAAAMHmgww (envelope-from ); Mon, 29 Aug 2022 03:13:01 +0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 From: "NeilBrown" To: "Al Viro" Cc: "Linus Torvalds" , "Daire Byrne" , "Trond Myklebust" , "Chuck Lever" , "Linux NFS Mailing List" , linux-fsdevel@vger.kernel.org, "LKML" Subject: Re: [PATCH 08/10] NFSD: allow parallel creates from nfsd In-reply-to: References: <166147828344.25420.13834885828450967910.stgit@noble.brown>, <166147984376.25420.3784384336816172144.stgit@noble.brown>, Date: Mon, 29 Aug 2022 13:12:58 +1000 Message-id: <166174277856.27490.5042755038091513802@noble.neil.brown.name> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE 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-nfs@vger.kernel.org On Sat, 27 Aug 2022, Al Viro wrote: > On Fri, Aug 26, 2022 at 12:10:43PM +1000, NeilBrown wrote: > > > if (is_create_with_attrs(open)) > > nfsd4_acl_to_attr(NF4REG, open->op_acl, &attrs); > > + inode = d_inode(path.dentry); > > > > - inode_lock_nested(inode, I_MUTEX_PARENT); > > + child = filename_create_one_len(open->op_fname, > > + open->op_fnamelen, > > + &path, 0, &wq); > > > > - child = lookup_one_len(open->op_fname, parent, open->op_fnamelen); > > - if (IS_ERR(child)) { > > - status = nfserrno(PTR_ERR(child)); > > - goto out; > > - } > > + if (IS_ERR(child)) > > + return nfserrno(PTR_ERR(child)); > > Leaks acls, by the look of it? Yep - I think that fell through a crack when I reordered patches to get get some clean-ups into nfsd before this repost. > > > + if (!IS_PAR_UPDATE(fhp->fh_dentry->d_inode) && > > + inode_trylock_shared(fhp->fh_dentry->d_inode)) { > > + /* only have a shared lock */ > > + inode_unlock_shared(fhp->fh_dentry->d_inode); > > + fhp->fh_no_atomic_attr = true; > > + fhp->fh_no_wcc = true; > > Er... Shouldn't that be IS_PAR_UPDATE() && ... ? > Definitely. Thanks! NeilBrown