summaryrefslogtreecommitdiff
path: root/fs/cifs/smb2ops.c
diff options
context:
space:
mode:
authorSteve French <stfrench@microsoft.com>2021-07-23 18:35:15 -0500
committerSteve French <stfrench@microsoft.com>2021-07-26 22:35:25 -0500
commitf2a26a3cff27dfa456fef386fe5df56dcb4b47b6 (patch)
treed22437eae1f459da59249ac50f0a195ac058df3a /fs/cifs/smb2ops.c
parentff1176468d368232b684f75e82563369208bc371 (diff)
SMB3: fix readpage for large swap cache
readpage was calculating the offset of the page incorrectly for the case of large swapcaches. loff_t offset = (loff_t)page->index << PAGE_SHIFT; As pointed out by Matthew Wilcox, this needs to use page_file_offset() to calculate the offset instead. Pages coming from the swap cache have page->index set to their index within the swapcache, not within the backing file. For a sufficiently large swapcache, we could have overlapping values of page->index within the same backing file. Suggested by: Matthew Wilcox (Oracle) <willy@infradead.org> Cc: <stable@vger.kernel.org> # v5.7+ Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/smb2ops.c')
0 files changed, 0 insertions, 0 deletions