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 1, 2024
1 parent 8ed94a9 commit b211971
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 @@ -386,18 +386,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);
}

static int
Expand Down

0 comments on commit b211971

Please sign in to comment.