Skip to content

Fix double unlock in scoutfs_setattr data_wait error path#298

Open
aversecat wants to merge 1 commit intomainfrom
auke/double_unlock_dw_truncate
Open

Fix double unlock in scoutfs_setattr data_wait error path#298
aversecat wants to merge 1 commit intomainfrom
auke/double_unlock_dw_truncate

Conversation

@aversecat
Copy link
Copy Markdown
Contributor

When scoutfs_setattr truncates a file with offline extents, it unlocks the inode lock before calling scoutfs_data_wait to wait for the data to be staged. If data_wait returns any error, the code jumps to 'goto out' which calls scoutfs_unlock again, thus double-unlocking the lock.

When scoutfs_setattr truncates a file with offline extents, it unlocks
the inode lock before calling scoutfs_data_wait to wait for the data
to be staged. If data_wait returns any error, the code jumps to 'goto
out' which calls scoutfs_unlock again, thus double-unlocking the lock.

Signed-off-by: Auke Kok <auke.kok@versity.com>
@aversecat aversecat force-pushed the auke/double_unlock_dw_truncate branch from d0d2cb9 to f8b0abe Compare April 17, 2026 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant