* [GIT PULL] netfs: Fix folio unmarking/unlocking loops
@ 2022-11-15 21:19 David Howells
2022-11-15 23:01 ` pr-tracker-bot
0 siblings, 1 reply; 2+ messages in thread
From: David Howells @ 2022-11-15 21:19 UTC (permalink / raw)
To: torvalds
Cc: dhowells, willy, Jeff Layton, JeffleXu, linux-cachefs,
linux-fsdevel, linux-kernel
Hi Linus,
Could you pull these changes please? There are two, affecting the
functions that iterates over the pagecache unmarking or unlocking pages
after an op is complete:
(1) xas_for_each() loops must call xas_retry() first thing and immediately
do a "continue" in the case that the extracted value is a special
value that indicates that the walk raced with a modification. Fix the
unlock and unmark loops to do this.
(2) The maths in the unlock loop is dodgy as it could, theoretically, at
some point in the future end up with a starting file pointer that is
in the middle of a folio. This will cause a subtraction to go
negative - but the number is unsigned. Fix the maths to use absolute
file positions instead of relative page indices.
Thanks,
David
Link: https://lore.kernel.org/r/166749229733.107206.17482609105741691452.stgit@warthog.procyon.org.uk/ # v1
Link: https://lore.kernel.org/r/166757987929.950645.12595273010425381286.stgit@warthog.procyon.org.uk/ # v2
---
The following changes since commit f0c4d9fc9cc9462659728d168387191387e903cc:
Linux 6.1-rc4 (2022-11-06 15:07:11 -0800)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git tags/netfs-fixes-20221115
for you to fetch changes up to 5e51c627c5acbcf82bb552e17533a79d2a6a2600:
netfs: Fix dodgy maths (2022-11-15 16:56:07 +0000)
----------------------------------------------------------------
netfslib fixes
----------------------------------------------------------------
David Howells (2):
netfs: Fix missing xas_retry() calls in xarray iteration
netfs: Fix dodgy maths
fs/netfs/buffered_read.c | 20 +++++++++++++-------
fs/netfs/io.c | 3 +++
2 files changed, 16 insertions(+), 7 deletions(-)
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [GIT PULL] netfs: Fix folio unmarking/unlocking loops
2022-11-15 21:19 [GIT PULL] netfs: Fix folio unmarking/unlocking loops David Howells
@ 2022-11-15 23:01 ` pr-tracker-bot
0 siblings, 0 replies; 2+ messages in thread
From: pr-tracker-bot @ 2022-11-15 23:01 UTC (permalink / raw)
To: David Howells
Cc: torvalds, dhowells, willy, Jeff Layton, JeffleXu, linux-cachefs,
linux-fsdevel, linux-kernel
The pull request you sent on Tue, 15 Nov 2022 21:19:29 +0000:
> git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git tags/netfs-fixes-20221115
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/59d0d52c30d4991ac4b329f049cc37118e00f5b0
Thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-11-15 23:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-15 21:19 [GIT PULL] netfs: Fix folio unmarking/unlocking loops David Howells
2022-11-15 23:01 ` pr-tracker-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®