Commit 76a51ac
Miklos Szeredi
fuse: clear PG_uptodate when using a stolen page
Originally when a stolen page was inserted into fuse's page cache by
fuse_try_move_page(), it would be marked uptodate. Then
fuse_readpages_end() would call SetPageUptodate() again on the already
uptodate page.
Commit 413e8f0 ("fuse: Convert fuse_readpages_end() to use
folio_end_read()") changed that by replacing the SetPageUptodate() +
unlock_page() combination with folio_end_read(), which does mostly the
same, except it sets the uptodate flag with an xor operation, which in the
above scenario resulted in the uptodate flag being cleared, which in turn
resulted in EIO being returned on the read.
Fix by clearing PG_uptodate instead of setting it in fuse_try_move_page(),
conforming to the expectation of folio_end_read().
Reported-by: Jürg Billeter <[email protected]>
Debugged-by: Matthew Wilcox <[email protected]>
Fixes: 413e8f0 ("fuse: Convert fuse_readpages_end() to use folio_end_read()")
Cc: <[email protected]> # v6.10
Signed-off-by: Miklos Szeredi <[email protected]>1 parent 3002240 commit 76a51ac
1 file changed
+1
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
775 | 775 | | |
776 | 776 | | |
777 | 777 | | |
778 | | - | |
779 | 778 | | |
780 | 779 | | |
781 | 780 | | |
| |||
820 | 819 | | |
821 | 820 | | |
822 | 821 | | |
823 | | - | |
824 | | - | |
825 | | - | |
| 822 | + | |
826 | 823 | | |
827 | 824 | | |
828 | 825 | | |
| |||
0 commit comments