]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
iomap: fix sub-page uptodate handling
authorChristoph Hellwig <hch@lst.de>
Wed, 4 Dec 2019 17:33:52 +0000 (09:33 -0800)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 18 Jun 2021 13:02:18 +0000 (15:02 +0200)
commit1c92324a01d971a8a159e8e5779b8e2298d93023
treec72e849f724965ac9be7f96190fcc5fb4d39431d
parentd75173798d5988fc41e8c96d55421ce902c7a29c
iomap: fix sub-page uptodate handling

BugLink: https://bugs.launchpad.net/bugs/1930474
commit 1cea335d1db1ce6ab71b3d2f94a807112b738a0f upstream.

bio completions can race when a page spans more than one file system
block.  Add a spinlock to synchronize marking the page uptodate.

Fixes: 9dc55f1389f9 ("iomap: add support for sub-pagesize buffered I/O without buffer heads")
Reported-by: Jan Stancek <jstancek@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
fs/iomap/buffered-io.c
include/linux/iomap.h