Skip to content

Commit 925c943

Browse files
committed
Merge tag 'fuse-fixes-5.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse
Pull fuse fix from Miklos Szeredi: "Fix a regression caused by a bugfix in the previous release. The symptom is a VM_BUG_ON triggered from splice to the fuse device. Unfortunately the original bugfix was already backported to a number of stable releases, so this fix-fix will need to be backported as well" * tag 'fuse-fixes-5.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse: fuse: release pipe buf after last use
2 parents 7e63545 + 4734417 commit 925c943

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

fs/fuse/dev.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -847,17 +847,17 @@ static int fuse_try_move_page(struct fuse_copy_state *cs, struct page **pagep)
847847

848848
replace_page_cache_page(oldpage, newpage);
849849

850+
get_page(newpage);
851+
852+
if (!(buf->flags & PIPE_BUF_FLAG_LRU))
853+
lru_cache_add(newpage);
854+
850855
/*
851856
* Release while we have extra ref on stolen page. Otherwise
852857
* anon_pipe_buf_release() might think the page can be reused.
853858
*/
854859
pipe_buf_release(cs->pipe, buf);
855860

856-
get_page(newpage);
857-
858-
if (!(buf->flags & PIPE_BUF_FLAG_LRU))
859-
lru_cache_add(newpage);
860-
861861
err = 0;
862862
spin_lock(&cs->req->waitq.lock);
863863
if (test_bit(FR_ABORTED, &cs->req->flags))

0 commit comments

Comments
 (0)