patches.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: stable@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	patches@lists.linux.dev,
	Kent Overstreet <kent.overstreet@linux.dev>
Subject: [PATCH 6.15 14/34] bcachefs: Kill un-reverted directory i_size code
Date: Sat,  7 Jun 2025 12:07:55 +0200	[thread overview]
Message-ID: <20250607100720.279128777@linuxfoundation.org> (raw)
In-Reply-To: <20250607100719.711372213@linuxfoundation.org>

6.15-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Kent Overstreet <kent.overstreet@linux.dev>

commit 95fafc0f3407a6446082c11849df585bd3246571 upstream.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 fs/bcachefs/dirent.c |   12 ++----------
 fs/bcachefs/dirent.h |    4 ++--
 fs/bcachefs/namei.c  |    4 ++--
 3 files changed, 6 insertions(+), 14 deletions(-)

--- a/fs/bcachefs/dirent.c
+++ b/fs/bcachefs/dirent.c
@@ -395,8 +395,8 @@ int bch2_dirent_read_target(struct btree
 }
 
 int bch2_dirent_rename(struct btree_trans *trans,
-		subvol_inum src_dir, struct bch_hash_info *src_hash, u64 *src_dir_i_size,
-		subvol_inum dst_dir, struct bch_hash_info *dst_hash, u64 *dst_dir_i_size,
+		subvol_inum src_dir, struct bch_hash_info *src_hash,
+		subvol_inum dst_dir, struct bch_hash_info *dst_hash,
 		const struct qstr *src_name, subvol_inum *src_inum, u64 *src_offset,
 		const struct qstr *dst_name, subvol_inum *dst_inum, u64 *dst_offset,
 		enum bch_rename_mode mode)
@@ -535,14 +535,6 @@ int bch2_dirent_rename(struct btree_tran
 	    new_src->v.d_type == DT_SUBVOL)
 		new_src->v.d_parent_subvol = cpu_to_le32(src_dir.subvol);
 
-	if (old_dst.k)
-		*dst_dir_i_size -= bkey_bytes(old_dst.k);
-	*src_dir_i_size -= bkey_bytes(old_src.k);
-
-	if (mode == BCH_RENAME_EXCHANGE)
-		*src_dir_i_size += bkey_bytes(&new_src->k);
-	*dst_dir_i_size += bkey_bytes(&new_dst->k);
-
 	ret = bch2_trans_update(trans, &dst_iter, &new_dst->k_i, 0);
 	if (ret)
 		goto out;
--- a/fs/bcachefs/dirent.h
+++ b/fs/bcachefs/dirent.h
@@ -80,8 +80,8 @@ enum bch_rename_mode {
 };
 
 int bch2_dirent_rename(struct btree_trans *,
-		       subvol_inum, struct bch_hash_info *, u64 *,
-		       subvol_inum, struct bch_hash_info *, u64 *,
+		       subvol_inum, struct bch_hash_info *,
+		       subvol_inum, struct bch_hash_info *,
 		       const struct qstr *, subvol_inum *, u64 *,
 		       const struct qstr *, subvol_inum *, u64 *,
 		       enum bch_rename_mode);
--- a/fs/bcachefs/namei.c
+++ b/fs/bcachefs/namei.c
@@ -418,8 +418,8 @@ int bch2_rename_trans(struct btree_trans
 	}
 
 	ret = bch2_dirent_rename(trans,
-				 src_dir, &src_hash, &src_dir_u->bi_size,
-				 dst_dir, &dst_hash, &dst_dir_u->bi_size,
+				 src_dir, &src_hash,
+				 dst_dir, &dst_hash,
 				 src_name, &src_inum, &src_offset,
 				 dst_name, &dst_inum, &dst_offset,
 				 mode);



  parent reply	other threads:[~2025-06-07 10:10 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-07 10:07 [PATCH 6.15 00/34] 6.15.2-rc1 review Greg Kroah-Hartman
2025-06-07 10:07 ` [PATCH 6.15 01/34] tracing: Fix compilation warning on arm32 Greg Kroah-Hartman
2025-06-07 10:07 ` [PATCH 6.15 02/34] Revert "x86/smp: Eliminate mwait_play_dead_cpuid_hint()" Greg Kroah-Hartman
2025-06-07 10:07 ` [PATCH 6.15 03/34] ACPICA: Introduce ACPI_NONSTRING Greg Kroah-Hartman
2025-06-07 10:07 ` [PATCH 6.15 04/34] ACPICA: Apply ACPI_NONSTRING Greg Kroah-Hartman
2025-06-07 10:07 ` [PATCH 6.15 05/34] ACPICA: Apply ACPI_NONSTRING in more places Greg Kroah-Hartman
2025-06-12  5:31   ` Collin Funk
2025-06-12  7:23     ` Jiri Slaby
2025-06-12  8:15       ` Ahmed Salem
2025-06-13  2:17         ` Collin Funk
2025-06-13  2:12       ` Collin Funk
2025-06-07 10:07 ` [PATCH 6.15 06/34] pinctrl: armada-37xx: use correct OUTPUT_VAL register for GPIOs > 31 Greg Kroah-Hartman
2025-06-07 10:07 ` [PATCH 6.15 07/34] pinctrl: armada-37xx: set GPIO output value before setting direction Greg Kroah-Hartman
2025-06-07 10:07 ` [PATCH 6.15 08/34] clk: samsung: correct clock summary for hsi1 block Greg Kroah-Hartman
2025-06-07 10:07 ` [PATCH 6.15 09/34] acpi-cpufreq: Fix nominal_freq units to KHz in get_max_boost_ratio() Greg Kroah-Hartman
2025-06-07 10:07 ` [PATCH 6.15 10/34] Documentation: ACPI: Use all-string data node references Greg Kroah-Hartman
2025-06-07 10:07 ` [PATCH 6.15 11/34] pinctrl: mediatek: eint: Fix invalid pointer dereference for v1 platforms Greg Kroah-Hartman
2025-06-07 10:07 ` [PATCH 6.15 12/34] rtc: Make rtc_time64_to_tm() support dates before 1970 Greg Kroah-Hartman
2025-06-07 10:07 ` [PATCH 6.15 13/34] rtc: Fix offset calculation for .start_secs < 0 Greg Kroah-Hartman
2025-06-07 10:07 ` Greg Kroah-Hartman [this message]
2025-06-07 10:07 ` [PATCH 6.15 15/34] bcachefs: Repair code for directory i_size Greg Kroah-Hartman
2025-06-07 10:07 ` [PATCH 6.15 16/34] bcachefs: delete dead code from may_delete_deleted_inode() Greg Kroah-Hartman
2025-06-07 10:07 ` [PATCH 6.15 17/34] bcachefs: Run may_delete_deleted_inode() checks in bch2_inode_rm() Greg Kroah-Hartman
2025-06-07 10:07 ` [PATCH 6.15 18/34] bcachefs: Fix subvol to missing root repair Greg Kroah-Hartman
2025-06-07 10:08 ` [PATCH 6.15 19/34] usb: quirks: Add NO_LPM quirk for SanDisk Extreme 55AE Greg Kroah-Hartman
2025-06-07 10:08 ` [PATCH 6.15 20/34] usb: storage: Ignore UAS driver for SanDisk 3.2 Gen2 storage device Greg Kroah-Hartman
2025-06-07 10:08 ` [PATCH 6.15 21/34] USB: serial: pl2303: add new chip PL2303GC-Q20 and PL2303GT-2AB Greg Kroah-Hartman
2025-06-07 10:08 ` [PATCH 6.15 22/34] usb: typec: ucsi: fix Clang -Wsign-conversion warning Greg Kroah-Hartman
2025-06-07 10:08 ` [PATCH 6.15 23/34] Bluetooth: hci_qca: move the SoC type check to the right place Greg Kroah-Hartman
2025-06-07 10:08 ` [PATCH 6.15 24/34] serial: jsm: fix NPE during jsm_uart_port_init Greg Kroah-Hartman
2025-06-07 10:08 ` [PATCH 6.15 25/34] nvmem: rmem: select CONFIG_CRC32 Greg Kroah-Hartman
2025-06-07 10:08 ` [PATCH 6.15 26/34] usb: usbtmc: Fix timeout value in get_stb Greg Kroah-Hartman
2025-06-07 10:08 ` [PATCH 6.15 27/34] binder: fix use-after-free in binderfs_evict_inode() Greg Kroah-Hartman
2025-06-07 10:08 ` [PATCH 6.15 28/34] binder: fix yet another UAF in binder_devices Greg Kroah-Hartman
2025-06-07 10:08 ` [PATCH 6.15 29/34] thunderbolt: Do not double dequeue a configuration request Greg Kroah-Hartman
2025-06-07 10:08 ` [PATCH 6.15 30/34] dt-bindings: pwm: adi,axi-pwmgen: Fix clocks Greg Kroah-Hartman
2025-06-10 14:12   ` David Lechner
2025-06-07 10:08 ` [PATCH 6.15 31/34] dt-bindings: remoteproc: qcom,sm8150-pas: Add missing SC8180X compatible Greg Kroah-Hartman
2025-06-07 10:08 ` [PATCH 6.15 32/34] dt-bindings: usb: cypress,hx3: Add support for all variants Greg Kroah-Hartman
2025-06-07 10:08 ` [PATCH 6.15 33/34] dt-bindings: phy: imx8mq-usb: fix fsl,phy-tx-vboost-level-microvolt property Greg Kroah-Hartman
2025-06-07 10:08 ` [PATCH 6.15 34/34] Revert "drm/amd/display: more liberal vmin/vmax update for freesync" Greg Kroah-Hartman
2025-06-07 11:42 ` [PATCH 6.15 00/34] 6.15.2-rc1 review Christian Heusel
2025-06-07 11:50 ` Ronald Warsow
2025-06-08  5:26   ` Luna Jernberg
2025-06-07 20:19 ` Florian Fainelli
2025-06-08  5:13 ` Takeshi Ogasawara
2025-06-08  5:38 ` Ron Economos
2025-06-08  6:53 ` Naresh Kamboju
2025-06-08 17:40 ` Peter Schneider
2025-06-08 22:31 ` Mark Brown
2025-06-09 12:48 ` Jon Hunter
2025-06-12 20:30 ` Miguel Ojeda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250607100720.279128777@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=kent.overstreet@linux.dev \
    --cc=patches@lists.linux.dev \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).