From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796157941; b=pB3W1WAiXrfEErsowq5FR47Prvi9ZPxpOyHtv4j+/uIvIFPChKPPt1SNCLbbusCDnI4S NCjcsE7hwwcHmqXj/+S76fus22TfI2Kq2BIyqqgAXLpVlr09JYznhJ03URDcDwKpkxGTB OWbsNTI5XBKQgDFT5BlO1gDbKmPZ5qsjF+dBA+GNbFKVXWyyI3h+9HwZvgoKp68oU2zu5 9hLJjVq3IPo29Aj4uI6Pmea2VS7z6fr4xm79hRuouS+d7mioLOfrE745p/wG4K68xdN4y ggAzGaoDrdm1cvWWNiVOff58eIYbyBrk6wNbuDV1kFWtPwS22bwiXTvxSB2tRBgLuvg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796157941; h=Received:DKIM-Signature:Date:To:From:In-Reply-To:References:Subject: Message-Id; bh=n9zn0718Es7H/1YQxed5mfuWRTXqqGrKkjVk6bOkJ0Q=; b=bGdJlAZBx7+a3jJl8/NWxUon1xynLv9C0bY+zkil4rAmX3WpUiFxdwSFD4+ODteKfFFr LlCFvtj5JbiGQh+RGbhElivFcfqvZiM1GDquQa7snlSo0BAKpJlSFJe+J7Q6H4xMFHIBj k0WRULTyzpQvP6RWh2genBELYf+VttVASLBPsZ0YhJmJT33csWzzw7RxrGhK5N30MotHZ PelNAewXV360Ze0ViraxHTn2Dj0nvHQYrAuOz7M6BWo+50od4lBHeypozgKwmcZXYkqBc wL3vOCsEonv+YVHMkW6Fetg3eVjmct1L8jbAUZXuZ/andNhcCQrby0Fy3Mm4lveEARQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linux-foundation.org header.i=@linux-foundation.org header.a=rsa-sha256 header.s=korg header.b=QLXRLPcd; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0E2DC606A320 for ; Tue, 1 Dec 2026 20:45:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.a=rsa-sha256 header.s=korg header.b=QLXRLPcd Received: by smtp.kernel.org (Postfix) with ESMTPSA id 73D1F1F00897; Tue, 1 Dec 2026 20:45:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=korg; t=1796157940; bh=n9zn0718Es7H/1YQxed5mfuWRTXqqGrKkjVk6bOkJ0Q=; h=Date:To:From:In-Reply-To:References:Subject; b=QLXRLPcdPcQHZnbSctQMzR469g0mf66oXNP8n2OL77V0J/kR2e324ZDspIJFzTJKw 1BQQHPeSsgFeF9CIHfBt307vYI8Az7JfCYadTB4TxaD75Xlup3B2WsabQOgh8Mfjqf 5Vuf9obEJ8ZrgDdJhC5ARGzvPR7fp2O5kEZX6O10= Date: Tue, 01 Dec 2026 12:45:40 -0800 To: mm-commits@vger.kernel.org,richardycc@google.com,minchan@kernel.org, senozhatsky@chromium.org,akpm@linux-foundation.org From: Andrew Morton In-Reply-To: <20261201090703.1040645-5-senozhatsky@chromium.org> References: <20261201090703.1040645-5-senozhatsky@chromium.org> Subject: + zram-remove-out-label-in-recompress_store.patch added to mm-new branch Message-Id: <20261201204540.73D1F1F00897@smtp.kernel.org> X-Mailing-List: mm-commits@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list The patch titled Subject: zram: remove out label in recompress_store() has been added to the -mm mm-new branch. Its filename is zram-remove-out-label-in-recompress_store.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/zram-remove-out-label-in-recompress_store.patch This patch will later appear in the mm-new branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Note, mm-new is a provisional staging ground for work-in-progress patches, and acceptance into mm-new is a notification for others take notice and to finish up reviews. Please do not hesitate to respond to review feedback and post updated versions to replace or incrementally fixup patches in mm-new. The mm-new branch of mm.git is not included in linux-next If a few days of testing in mm-new is successful, the patch will me moved into mm.git's mm-unstable branch, which is included in linux-next Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via various branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there most days ------------------------------------------------------ From: Sergey Senozhatsky Subject: zram: remove out label in recompress_store() Date: Tue, 01 Dec 2026 18:06:37 +0900 The only two jumps to the out label in recompress_store() are the alloc_page() and init_pp_ctl() failure paths. Return directly on those two paths instead and simplify the function return path. Link: https://patch.msgid.link/20261201090703.1040645-5-senozhatsky@chromium.org Signed-off-by: Sergey Senozhatsky Signed-off-by: Andrew Morton Cc: Minchan Kim Cc: Richard Chang drivers/block/zram/zram_drv.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) --- a/drivers/block/zram/zram_drv.c~zram-remove-out-label-in-recompress_store +++ a/drivers/block/zram/zram_drv.c @@ -2600,11 +2600,11 @@ static ssize_t recompress_store(struct d char *args, *param, *val, *algo = NULL; u64 num_recomp_pages = ULLONG_MAX; char *kbuf __free(kfree) = NULL; - struct zram_pp_ctl *ctl = NULL; + struct zram_pp_ctl *ctl; s32 prio = ZRAM_SECONDARY_COMP; u32 mode = 0, threshold = 0; struct zram_pp_slot *pps; - struct page *page = NULL; + struct page *page; bool prio_param = false; ssize_t ret; @@ -2695,15 +2695,13 @@ static ssize_t recompress_store(struct d return -EINVAL; page = alloc_page(GFP_KERNEL); - if (!page) { - ret = -ENOMEM; - goto out; - } + if (!page) + return -ENOMEM; ctl = init_pp_ctl(); if (!ctl) { - ret = -ENOMEM; - goto out; + __free_page(page); + return -ENOMEM; } scan_slots_for_recompress(zram, mode, prio, ctl); @@ -2733,9 +2731,7 @@ next: cond_resched(); } -out: - if (page) - __free_page(page); + __free_page(page); release_pp_ctl(zram, ctl); return ret; } _ Patches currently in -mm which might be from senozhatsky@chromium.org are zram-prefix-backends-printk-s.patch zram-remove-debugfs-entry-on-init-failure.patch zram-reset-writeback-state-in-zram_reset_device.patch zram-move-mark_slot_accessed-under-existing-slot-lock-sections.patch zram-remove-stale-warn_on-from-zram_read_page.patch zram-zstd-do-not-allocate-empty-c-d-dictionaries.patch zram-lz4hc-pre-initialize-dictionary-stream-in-setup_params.patch zram-lz4-use-lz4_decompress_safe_usingdict.patch zram-lz4hc-use-lz4_decompress_safe_usingdict.patch zram-zstd-do-not-use-kvzalloc-for-zstd-allocations.patch zram-split-zcomp-into-separate-r-w-streams.patch zram-introduce-shared-decompression-streams.patch zram-allocate-bounce-buffer-for-spanning-objects.patch zram-borrow-idle-decompression-streams-in-exclusive-mode.patch zram-use-a-singleton-compression-context-for-recompression.patch zram-drop-stale-comment-in-write_incompressible_page.patch zram-drop-get_slot_handle-and-set_slot_handle.patch zsmalloc-return-handle-from-obj_allocated.patch zsmalloc-switch-handle-type-to-struct-zs_handle.patch zram-check-mem_limit-before-allocating-zsmalloc-object.patch zram-allocate-zsmalloc-object-under-slot-lock.patch zswap-do-not-free-the-entry-if-its-pool-is-null.patch zsmalloc-encode-1-based-obj_idx-so-valid-obj-is-never-0.patch zsmalloc-embed-struct-zs_handle-into-zram-and-zswap-entries.patch zsmalloc-fold-zs_obj_write-into-zs_store.patch zsmalloc-populate-new-zspage-outside-class-lock-in-zs_store.patch zram-fix-quadratic-writeback-bitmap-search.patch zsmalloc-free-a-zspages-pages-in-one-batch.patch zram-keep-the-hot-statistics-per-cpu.patch zram-do-not-modify-cont-sysfs-store-buffers.patch zram-avoid-rollback-uaf-in-zcomp_cpu_up_prepare.patch zram-publish-streams-under-lock-in-zcomp_cpu_up_prepare.patch zram-allocate-comp-only-if-it-is-supported.patch zram-validate-level-before-allocation-in-zstd_setup_params.patch zram-defer-wb_ctl-allocation-in-writeback_store.patch zram-remove-out-label-in-recompress_store.patch zram-create-debugfs-dir-after-register_blkdev-in-zram_init.patch zram-respect-80-cols-limit-in-zram_meta_alloc.patch zram-rename-mark_idle-to-mark_slots_idle.patch zsmalloc-fix-spdx-license-identifier.patch zram-use-spdx-license-identifier.patch maintainers-add-mm-and-block-lists-to-zram-entry.patch