mirror of
https://github.com/versity/scoutfs.git
synced 2026-04-21 22:10:30 +00:00
Fix double unlock in scoutfs_setattr data_wait error path
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>
This commit is contained in:
@@ -549,6 +549,7 @@ retry:
|
||||
goto out;
|
||||
if (scoutfs_data_wait_found(&dw)) {
|
||||
scoutfs_unlock(sb, lock, SCOUTFS_LOCK_WRITE);
|
||||
lock = NULL;
|
||||
|
||||
/* XXX callee locks instead? */
|
||||
inode_unlock(inode);
|
||||
|
||||
Reference in New Issue
Block a user