Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp590230lqp; Thu, 21 Mar 2024 09:37:17 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWu9b8BAThOfyboMxugZUk3tbUY8KNralJiolrdq+dGRE0Yztd1vp4UD6xsE8NF4CiVDOSIASrvTRLInMZ2e4KQW7UNXuCuJU5+LRqE3g== X-Google-Smtp-Source: AGHT+IF24/R02kZyUg7crudo4yowEFMAhXQ9Sx38b5BHHOZVJCHsx6njrRvc9cgo6bILTl9XTKsp X-Received: by 2002:a17:906:5813:b0:a46:8856:e6bf with SMTP id m19-20020a170906581300b00a468856e6bfmr3753819ejq.44.1711039037484; Thu, 21 Mar 2024 09:37:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711039037; cv=pass; d=google.com; s=arc-20160816; b=0GLiRZSPJeOfqhcdDXcMFkyNSHc+oFNMez1ESwCvoUpkFSeycfMI3k+bVqD8tiRGNU SMZpAvWJ6vwy9juKY3pyfIbNhXo9HS87h8WhjF3q8422jV/4TYz1qFno/NKuay96Dwan 32vryhklCtPENLH5SxfOwgk3M9QB9uDrVi1vE8hoSGXRoqI9OqWg0fn7/oeVor0+1HAq QQmysmZtTn+ormm/uG2NSQDAlMa9XzF0BTS387DVMedUmAATh2iZBL1OXywGa6BIz6/M jn3cmYk50WK+wac5rcyAUW4ykNRZSHzeiAo8WooCrfiU2J+RR3hJt8sGESjdth1ru6Qo Q18A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature:dkim-signature; bh=lNDwYy8q7k5nfMJQt3W2N8aT3pxFWbMxuOHZJXqTovc=; fh=6Vx9+QzmP21tBbuKl7BrSA6lQq60WmkekO5hDFQU/CM=; b=hUeN7RgN5aU+eWv17oH0GpY4Dg6V38sSkQ70zZPOItmP1mAKWCSSlggPE4iQ1MIMxF Ik0QKnzieIuLW4IBog5v8uo3Qf7bfQS8Ikb92njL57mev5nyOVemoTRlohYEZb8jvnv1 8ZDIZ1lIHMdz+sjH+I6uQ2s3Y2a2BQuV6IOWWhs5Vdl4djXoQ6+NT3QIcneNmCkLHxrU UcwJk92s8zPA/t/DVd/oizfM5IZ2vXU5J5doKqeEhwxCp6Rdfsvgq3aVdqfcMX1sjGOM IBqfnTgWBqDR6hxhuAQ/kh+y1dlD0f/nazEGPy16kK5kVB7hcve5wdVzIZoR8a397zPr P0Ow==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=f1R0fp9z; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.cz dkim=pass dkdomain=suse.cz); spf=pass (google.com: domain of linux-ext4+bounces-1727-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1727-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id e24-20020a170906315800b00a46b86b1ffbsi86341eje.124.2024.03.21.09.37.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Mar 2024 09:37:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4+bounces-1727-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=f1R0fp9z; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.cz dkim=pass dkdomain=suse.cz); spf=pass (google.com: domain of linux-ext4+bounces-1727-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1727-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 7EA8D1F2610E for ; Thu, 21 Mar 2024 16:27:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B928212CDB5; Thu, 21 Mar 2024 16:27:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="f1R0fp9z"; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="1OzO8CBR" X-Original-To: linux-ext4@vger.kernel.org Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5B5AD12CD98 for ; Thu, 21 Mar 2024 16:27:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711038423; cv=none; b=gWY4PFCuaJsCcM8cbTNm0qzd3OGgkBX0qea+Jiu8RRc7PS6VkMdcD2tM/mXmtBgLpj0i/9a6h6ihArQrC2SeHsoNCoieX0PYwA37UNAfRAhJq3yrUC3MB2UKAp4VrP3iZSRUO0xE6QG3VMuflbNOKKmbcoBJc0RW3Jlh3HhkHmA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711038423; c=relaxed/simple; bh=UZHj9XNcXaTmklSR/AIinK6Iy7OvYagbPS3mKBpmG0w=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=DG1EXMeh8b0/EogZBzfb/AIkay2ZtErdXuAe+prNtXizxhnztXFc/YEhlqkvGMWHZ+iyrkfCtMFK7opIuuneDkuEVS0fMiChIh9fvD9Lo1M750DXZHbarAvFQGeSr8Hm4oIWmvG4EVv8Fp3y5QNDFty126/xY2Tu5IFMI3TY2tE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz; spf=pass smtp.mailfrom=suse.cz; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b=f1R0fp9z; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=1OzO8CBR; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.cz Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 3B7935D12A; Thu, 21 Mar 2024 16:26:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1711038418; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lNDwYy8q7k5nfMJQt3W2N8aT3pxFWbMxuOHZJXqTovc=; b=f1R0fp9zFKNsCImFrml5OelOqFFP2Ffx2QyDeKj/87i7wMUgiRdgUK/3uq21VLdpe68de5 /BKSpUN6fcQO76IwjFi4CN0TewMj1RPC7NvpEzea9pEPPlv1nchaPzkuLlVfbCVFbm+ZtA o7dj5lfP2YX8EVXYeC/tH8VLm2Y4Ntw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1711038418; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lNDwYy8q7k5nfMJQt3W2N8aT3pxFWbMxuOHZJXqTovc=; b=1OzO8CBR6qy/NIZj84EqdwCC4wRXN97z1Za455REwEnmAobw/009Oj93ma3JUt/yEeQp4K 25mYyxdOnMz/icAg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 30EE8138A7; Thu, 21 Mar 2024 16:26:58 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id YIGoC9Jf/GWzGQAAD6G6ig (envelope-from ); Thu, 21 Mar 2024 16:26:58 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id C7AC4A080F; Thu, 21 Mar 2024 17:26:57 +0100 (CET) From: Jan Kara To: Ted Tso Cc: , Jan Kara Subject: [PATCH 1/2] Revert "ext4: drop duplicate ea_inode handling in ext4_xattr_block_set()" Date: Thu, 21 Mar 2024 17:26:49 +0100 Message-Id: <20240321162657.27420-1-jack@suse.cz> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20240209111418.22308-1-jack@suse.cz> References: <20240209111418.22308-1-jack@suse.cz> Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1004; i=jack@suse.cz; h=from:subject; bh=UZHj9XNcXaTmklSR/AIinK6Iy7OvYagbPS3mKBpmG0w=; b=owEBbQGS/pANAwAIAZydqgc/ZEDZAcsmYgBl/F/JEQpASIrBmgIl1yadrmeSM4FCW9tUmqOj2GNU pFjln02JATMEAAEIAB0WIQSrWdEr1p4yirVVKBycnaoHP2RA2QUCZfxfyQAKCRCcnaoHP2RA2QNqCA CITa2f+DB0anFA51G2+L4Z/AM/NmbqYOJ55HukNCVRF8xE1AGg6dVc7t/oMAgG+8X+07jd9pVog+B4 JrU6KYkm0DspAm1NWZhykabdblKVBv8z51ehlxkmI+3mmWgS7jJtu5do2u8p1vsaZ6R/JM9/S8LWOd XamY9kDhSsIbHjqNVP9CpcWaZaREhBi14XSoptY0u3sYAd9e4GUUAkh1mLvEqkSv6WG1FyuQEIQUjI ZvAA21VGY1FJcNzMFQXTFeNbzNC7ApiGj1cshHyTiRncpQgOGPxDIr21lJn7Cnqv73yolHSSTbCYPV 6EN//cyI0wi/XvIRwmngmKuvbWx9hA X-Developer-Key: i=jack@suse.cz; a=openpgp; fpr=93C6099A142276A28BBE35D815BC833443038D8C Content-Transfer-Encoding: 8bit X-Spam-Score: -4.00 X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Flag: NO X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Spam-Level: Authentication-Results: smtp-out2.suse.de; none X-Rspamd-Queue-Id: 3B7935D12A This reverts commit 7f48212678e91a057259b3e281701f7feb1ee397. We will need the special cleanup handling once we move allocation of EA inode outside of the buffer lock in the following patch. Signed-off-by: Jan Kara --- fs/ext4/xattr.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c index b67a176bfcf9..146690c10c73 100644 --- a/fs/ext4/xattr.c +++ b/fs/ext4/xattr.c @@ -2158,6 +2158,17 @@ ext4_xattr_block_set(handle_t *handle, struct inode *inode, ENTRY(header(s->base)+1)); if (error) goto getblk_failed; + if (ea_inode) { + /* Drop the extra ref on ea_inode. */ + error = ext4_xattr_inode_dec_ref(handle, + ea_inode); + if (error) + ext4_warning_inode(ea_inode, + "dec ref error=%d", + error); + iput(ea_inode); + ea_inode = NULL; + } lock_buffer(new_bh); error = ext4_journal_get_create_access(handle, sb, -- 2.35.3