Skip to content

Commit

Permalink
Revert "Linux: Fix zfs_prune panics"
Browse files Browse the repository at this point in the history
This reverts commit 6fb74ca.
  • Loading branch information
snajpa committed Dec 2, 2024
1 parent 54ec6e9 commit d6509e7
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions module/os/linux/zfs/zpl_super.c
Original file line number Diff line number Diff line change
Expand Up @@ -384,18 +384,7 @@ zpl_prune_sb(uint64_t nr_to_scan, void *arg)
struct super_block *sb = (struct super_block *)arg;
int objects = 0;

/*
* deactivate_locked_super calls shrinker_free and only then
* sops->kill_sb cb, resulting in UAF on umount when trying to reach
* for the shrinker functions in zpl_prune_sb of in-umount dataset.
* Increment if s_active is not zero, but don't prune if it is -
* umount could be underway.
*/
if (atomic_inc_not_zero(&sb->s_active)) {
(void) -zfs_prune(sb, nr_to_scan, &objects);
atomic_dec(&sb->s_active);
}

(void) -zfs_prune(sb, nr_to_scan, &objects);
}

const struct super_operations zpl_super_operations = {
Expand Down

0 comments on commit d6509e7

Please sign in to comment.