From: Linus Torvalds Date: Tue, 1 Apr 2025 01:33:51 +0000 (-0700) Subject: Merge tag 'bcachefs-2025-03-31' of git://evilpiepirate.org/bcachefs X-Git-Tag: v6.15-rc1~83 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=98fb679d19a17aec624d53b016953a3fcd272e8d;p=thirdparty%2Flinux.git Merge tag 'bcachefs-2025-03-31' of git://evilpiepirate.org/bcachefs Pull more bcachefs updates from Kent Overstreet: "All bugfixes and logging improvements" * tag 'bcachefs-2025-03-31' of git://evilpiepirate.org/bcachefs: (35 commits) bcachefs: fix bch2_write_point_to_text() units bcachefs: Log original key being moved in data updates bcachefs: BCH_JSET_ENTRY_log_bkey bcachefs: Reorder error messages that include journal debug bcachefs: Don't use designated initializers for disk_accounting_pos bcachefs: Silence errors after emergency shutdown bcachefs: fix units in rebalance_status bcachefs: bch2_ioctl_subvolume_destroy() fixes bcachefs: Clear fs_path_parent on subvolume unlink bcachefs: Change btree_insert_node() assertion to error bcachefs: Better printing of inconsistency errors bcachefs: bch2_count_fsck_err() bcachefs: Better helpers for inconsistency errors bcachefs: Consistent indentation of multiline fsck errors bcachefs: Add an "ignore unknown" option to bch2_parse_mount_opts() bcachefs: bch2_time_stats_init_no_pcpu() bcachefs: Fix bch2_fs_get_tree() error path bcachefs: fix logging in journal_entry_err_msg() bcachefs: add missing newline in bch2_trans_updates_to_text() bcachefs: print_string_as_lines: fix extra newline ... --- 98fb679d19a17aec624d53b016953a3fcd272e8d diff --cc fs/bcachefs/fs-ioctl.c index f45054cee7467,0273130f18dcd..c1553e44e049a --- a/fs/bcachefs/fs-ioctl.c +++ b/fs/bcachefs/fs-ioctl.c @@@ -537,10 -537,16 +537,12 @@@ static long bch2_ioctl_subvolume_destro ret = -EXDEV; goto err; } - ret = __bch2_unlink(dir, victim, true); - if (!d_is_positive(victim)) { - ret = -ENOENT; - goto err; - } + + ret = inode_permission(file_mnt_idmap(filp), d_inode(victim), MAY_WRITE) ?: + __bch2_unlink(dir, victim, true); if (!ret) { fsnotify_rmdir(dir, victim); - d_delete(victim); + d_invalidate(victim); } err: inode_unlock(dir);