From nobody Sun Feb 8 01:52:04 2026 Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com [209.85.216.52]) (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 5C06B27A476 for ; Wed, 4 Feb 2026 17:04:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770224689; cv=none; b=mJSdDpxloyuwtJ6n8ECXbMDj58qvuAyraISfnZ6bVX5cGLIVbkeWWUj5RzTxMdsr8yO/VGaV0Ov/4/SkE/bhmb4S32cPA+5i76lYGCX4gOA7OxRmg9mLsT7NmVTjcEeW6NrdGswtlncjF/ugBXVzJIaF8zDFK0ZGvqnTHNZRKyA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770224689; c=relaxed/simple; bh=mS8ucGBIHUUezgKGb/Wwgx1gKfIn4MGKPBvztxbPqso=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=FpW4E5DBeJiP3KCK+q1YnxIhbU5BvGJ+YW8zdJNa6HAYhloLJoYWGHbDq1ee9aN4gTT9cZWki/gC0CtyE3DA6VZz486Puq5VP4hHTjWFZhrbF4nqeun4iv0RAokDU4EmJDhjJ+Rze6whzzXlbQ+pLmPziEnVSsZkX7wNNzInR9I= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=S7L7Efja; arc=none smtp.client-ip=209.85.216.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="S7L7Efja" Received: by mail-pj1-f52.google.com with SMTP id 98e67ed59e1d1-352ccc61658so68632a91.0 for ; Wed, 04 Feb 2026 09:04:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770224689; x=1770829489; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=dJXubc+4+ghfE0A3GdnWkOuxt7SnmFexVx7zQStwRMo=; b=S7L7EfjazHC7UTOXnPEHp384D6NgdJ5K9BRnV8gjhT8vM6dbIu9IvkGIVak6Uz2UBa 6ZE/kDRZYCp7+OAKD44x1aKZjCiGvWZsrmftILN7iFUnSRzQnQWjC0cJe/7JMhAFwhIU XZF7KBMOBD7oE/ekO0hJg9DRHqVCWcKtrw9RBIVULui+Z4K04jjyxe9ATP9Iu+ypxH47 FPX75Kx45c84uFb7amJJobw8aJQpvS/tTQETFwYS2ddK6phwOH4CJqgT4EyfW32WLEg+ vbut+MxBQptlJgl8EUCGFLy5tbRlJMi4GZIPqho7ZVmZ+la1AKrnn40qGNrp1ZMl5J5O fnyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770224689; x=1770829489; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=dJXubc+4+ghfE0A3GdnWkOuxt7SnmFexVx7zQStwRMo=; b=nXEIM+clwTFQyxAeauEwa8g8OH5h+DHEI3Yjja9VkZ8bxRguAJRGSB0veYBubEruwD WyU8gjRjZzpXNpDCC3WkJp6tLTLyOIR0oSFtxc9SY+/37/3cZktErKUIUtHSx4SU81FR D2WtidLIhKoI40xNms6orKJJaz29s3uxFPxCvmBWitI+GCrBkPqi4cz6uCIvad9PGSTA GFRVx8Qai4Y86UeSvvnRunwM5FYzlw3T5NSjNuBoJKBT4x4o94pZJvfMHh4E7tG1xpvV uEjgSoFh5HYiBjWMl5wOzwLwYxqAIUHA+RrUkZbyjxNe79O6sMlRZ8eK+QzONfdOPw2Q O7vw== X-Forwarded-Encrypted: i=1; AJvYcCV7HKby1AEAOadhEF26PGvDbHzLIyGHhPjiSOsvNirw2eeMDypK7PvtExChwt+RqQTnezamv3lswFhsD7M=@vger.kernel.org X-Gm-Message-State: AOJu0Yy2fUyTEx1FiM0ZLgcCeZ8JSI8G+xKq88MkzKSWlbu/0OlFh+w6 OYApm5zdbodZW+vUZIwUjBpcvlvZmZAjE82PrFBcd1IRDGMNPDWSxhne X-Gm-Gg: AZuq6aL0wWjPl0ZgqBGPj6aP/wIXKb6zFSbfRelgG7CzrXgnh1EAQW6MUKc8aVLm7X1 HPa99XHlK0yG7EbcyNz2ATpRqXOm+pcvAQLD6f5Ot5OscMei9S51IR9X77FfsN+ldz8VnOGKZMq WFhMfxOfM3lVtD2Un5tT4Q3FDyhH7uWYmWL18ZLQxQOOFSsKkf+iOgZlQNsOlPLJq0PifjympS5 o7Cibt+DPjmecBYXvs+f3wc1obeuJ18KeDcewr1rBtVSap6/ikcbv7XVotTJrcng9ZAq3/POoaQ AcdEa5IRGrJ7DFL5rwdwIherlhlYUGO0E+VGJZ/pvSI3dYr97Ngl87slqbRvAnr3J+WBUWMbl6q HU6xTSnuThy13IcrA6PiIQ3+m6JwJ6tMNI/7X1n+o3lBs1PRyZL9ZT0XW0wtl4Q8LCqmbjMwXlU lT9KY7GPoztw6HiYc6EzaTuv7h7ZeBwe5XJrx4Kr1//9HLl0scEA== X-Received: by 2002:a17:90b:5107:b0:354:7be4:a250 with SMTP id 98e67ed59e1d1-35487103011mr3417685a91.12.1770224688505; Wed, 04 Feb 2026 09:04:48 -0800 (PST) Received: from Shardul.tailddf38c.ts.net ([223.185.43.31]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-35485dc6b7asm3286397a91.5.2026.02.04.09.04.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Feb 2026 09:04:47 -0800 (PST) From: Shardul Bankar X-Google-Original-From: Shardul Bankar To: slava@dubeyko.com, viro@zeniv.linux.org.uk, glaubitz@physik.fu-berlin.de, frank.li@vivo.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Cc: jack@suse.cz, brauner@kernel.org, janak@mpiricsoftware.com, shardulsb08@gmail.com, Shardul Bankar Subject: [PATCH] hfsplus: avoid double unload_nls() on mount failure Date: Wed, 4 Feb 2026 22:34:40 +0530 Message-Id: <20260204170440.1337261-1-shardul.b@mpiricsoftware.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <4375f20e2b0d3507a0209f7129e00d360d3eb32c.camel@mpiricsoftware.com> References: <4375f20e2b0d3507a0209f7129e00d360d3eb32c.camel@mpiricsoftware.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The recent commit "hfsplus: ensure sb->s_fs_info is always cleaned up" [1] introduced a custom ->kill_sb() handler (hfsplus_kill_super) that cleans up the s_fs_info structure (including the NLS table) on superblock destruction. However, the error handling path in hfsplus_fill_super() still calls unload_nls() before returning an error. Since the VFS layer calls ->kill_sb() when fill_super fails, this results in unload_nls() being called twice for the same sbi->nls pointer: once in hfsplus_fill_super() and again in hfsplus_kill_super() (via delayed_free). Remove the explicit unload_nls() call from the error path in hfsplus_fill_super() to rely solely on the cleanup in ->kill_sb(). [1] https://lore.kernel.org/r/20251201222843.82310-3-mehdi.benhadjkhelifa@g= mail.com/ Reported-by: Al Viro Link: https://lore.kernel.org/r/20260203043806.GF3183987@ZenIV/ Signed-off-by: Shardul Bankar Reviewed-by: Viacheslav Dubeyko --- fs/hfsplus/super.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/hfsplus/super.c b/fs/hfsplus/super.c index 829c8ac2639c..5ba26404f504 100644 --- a/fs/hfsplus/super.c +++ b/fs/hfsplus/super.c @@ -646,7 +646,6 @@ static int hfsplus_fill_super(struct super_block *sb, s= truct fs_context *fc) kfree(sbi->s_vhdr_buf); kfree(sbi->s_backup_vhdr_buf); out_unload_nls: - unload_nls(sbi->nls); unload_nls(nls); return err; } --=20 2.34.1