Skip to content
Snippets Groups Projects
Commit 38227933 authored by Josef Bacik's avatar Josef Bacik
Browse files

Btrfs: set trans to null in reserve_metadata_bytes if we commit the transaction


btrfs_commit_transaction will free our trans, but because we pass trans to
shrink_delalloc we could possibly have a use after free situation.  So instead
if we commit the transaction, set trans to null and set committed to true so we
don't keep trying to commit a transaction.  This fixes a panic I could reproduce
at will.  Thanks,

Signed-off-by: default avatarJosef Bacik <josef@redhat.com>
parent 0e78340f
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment