iomap: fix sub-page uptodate handling
authorChristoph Hellwig <hch@lst.de>
Wed, 4 Dec 2019 17:33:52 +0000 (09:33 -0800)
committerDarrick J. Wong <darrick.wong@oracle.com>
Wed, 4 Dec 2019 17:33:52 +0000 (09:33 -0800)
commit1cea335d1db1ce6ab71b3d2f94a807112b738a0f
treedf6798762ba98921119a17925a84b3989fbca17d
parent88cfd30e188fcf6fd8304586c936a6f22fb665e5
iomap: fix sub-page uptodate handling

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>
fs/iomap/buffered-io.c