From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A19AD36D51B; Tue, 3 Feb 2026 06:34:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.95.11.211 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770100484; cv=none; b=iAAUzeK42VWd+Oqm5EHpiEC8B4bLv3SpuWPOhCdDhPSlmosdCOTDtoh8e6vVSuAI44u3XlSOOCHUP45xMMtsceoMTLMpnAJyIw7nwfA4PPqHSvPcs9sBVennxY/2aBDHbtR42u7o3P6FC/Ja9Rv6NManamKT2ag1bNHB3C+6L98= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770100484; c=relaxed/simple; bh=brXpaqfz6gFQfBh7CR5kIfCOmQZoZKHuDiPVZWWOZxA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=NiDQHIgTUU7os8tXeFObNTzDFawj6VGZvaYo2QyVbS2PaxM0HLOYRu7pS2HK03y17KKcX+oYvUGWFqbyNlVxx22xI0RCrE5EoXdCsbT8HChMmxuLYuAJ3Iyfrj9GTuid8e9sdrxpwTufD/f5tAL2y5eG9bkXh7ILbyTnOw9yHr4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lst.de; spf=pass smtp.mailfrom=lst.de; arc=none smtp.client-ip=213.95.11.211 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lst.de Received: by verein.lst.de (Postfix, from userid 2407) id 3FAD468B05; Tue, 3 Feb 2026 07:34:39 +0100 (CET) Date: Tue, 3 Feb 2026 07:34:39 +0100 From: Christoph Hellwig To: Namjae Jeon Cc: viro@zeniv.linux.org.uk, brauner@kernel.org, hch@lst.de, tytso@mit.edu, willy@infradead.org, jack@suse.cz, djwong@kernel.org, josef@toxicpanda.com, sandeen@sandeen.net, rgoldwyn@suse.com, xiang@kernel.org, dsterba@suse.com, pali@kernel.org, ebiggers@kernel.org, neil@brown.name, amir73il@gmail.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, iamjoonsoo.kim@lge.com, cheol.lee@lge.com, jay.sim@lge.com, gunho.lee@lge.com, Hyunchul Lee Subject: Re: [PATCH v6 11/16] ntfs: update runlist handling and cluster allocator Message-ID: <20260203063439.GA18053@lst.de> References: <20260202220202.10907-1-linkinjeon@kernel.org> <20260202220202.10907-12-linkinjeon@kernel.org> Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260202220202.10907-12-linkinjeon@kernel.org> User-Agent: Mutt/1.5.17 (2007-11-01) Suggested commit message: Updates runlist handling and cluster allocation to support contiguous allocations and filesystem trimming. Improve the runlist API to handle allocation failures and introduces discard support. > + if (is_dealloc == true) > + ntfs_release_dirty_clusters(vol, rl->length); > up_write(&vol->lcnbmp_lock); > + memalloc_nofs_restore(memalloc_flags); > ntfs_debug("Done."); > + return rl == NULL ? ERR_PTR(-EIO) : rl; In general you want the memalloc_nofs_restore to be after goto labels in a single place, as otherwise debugging is really hard. In doubt a separate wrapper doing it my be even better.