diff options
author | Filipe Manana <fdmanana@suse.com> | 2023-07-03 20:15:30 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2023-07-18 04:12:59 +0300 |
commit | b777d279ff31979add57e8a3f810bceb7ef0cfb7 (patch) | |
tree | 7344483aa70637996240ebae2486070706693f8d /scripts/gdb/linux/utils.py | |
parent | f1a07c2b4e2c473ec322b8b9ece071b8c88a3512 (diff) | |
download | linux-b777d279ff31979add57e8a3f810bceb7ef0cfb7.tar.xz |
btrfs: fix double iput() on inode after an error during orphan cleanup
At btrfs_orphan_cleanup(), if we were able to find the inode, we do an
iput() on the inode, then if btrfs_drop_verity_items() succeeds and then
either btrfs_start_transaction() or btrfs_del_orphan_item() fail, we do
another iput() in the respective error paths, resulting in an extra iput()
on the inode.
Fix this by setting inode to NULL after the first iput(), as iput()
ignores a NULL inode pointer argument.
Fixes: a13bb2c03848 ("btrfs: add missing iputs on orphan cleanup failure")
CC: stable@vger.kernel.org # 6.4
Reviewed-by: Boris Burkov <boris@bur.io>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'scripts/gdb/linux/utils.py')
0 files changed, 0 insertions, 0 deletions