Skip to content

Commit 66d938e

Browse files
Lizhi Xubrauner
authored andcommitted
netfs: Prevent duplicate unlocking
The filio lock has been released here, so there is no need to jump to error_folio_unlock to release it again. Reported-by: [email protected] Closes: https://syzkaller.appspot.com/bug?extid=b73c7d94a151e2ee1e9b Signed-off-by: Lizhi Xu <[email protected]> Acked-by: David Howells <[email protected]> Reviewed-by: Paulo Alcantara (Red Hat) <[email protected]> Signed-off-by: Christian Brauner <[email protected]>
1 parent f83ec76 commit 66d938e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fs/netfs/buffered_write.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ ssize_t netfs_perform_write(struct kiocb *iocb, struct iov_iter *iter,
347347
folio_put(folio);
348348
ret = filemap_write_and_wait_range(mapping, fpos, fpos + flen - 1);
349349
if (ret < 0)
350-
goto error_folio_unlock;
350+
goto out;
351351
continue;
352352

353353
copied:

0 commit comments

Comments
 (0)