diff options
author | Christoph Hellwig <hch@infradead.org> | 2011-11-19 13:13:41 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-11-26 09:10:05 -0800 |
commit | 3da97f9710ca1df6cebe2558896dae3ed62337be (patch) | |
tree | 84f34c67c903c1dcbbb2fec9277835d957387f2e /fs/xfs/xfs_mount.c | |
parent | 16ba92e591d31d3213956e581867f46892648038 (diff) | |
download | kernel_samsung_smdk4412-3da97f9710ca1df6cebe2558896dae3ed62337be.zip kernel_samsung_smdk4412-3da97f9710ca1df6cebe2558896dae3ed62337be.tar.gz kernel_samsung_smdk4412-3da97f9710ca1df6cebe2558896dae3ed62337be.tar.bz2 |
xfs: avoid direct I/O write vs buffered I/O race
commit c58cb165bd44de8aaee9755a144136ae743be116 upstream.
Currently a buffered reader or writer can add pages to the pagecache
while we are waiting for the iolock in xfs_file_dio_aio_write. Prevent
this by re-checking mapping->nrpages after we got the iolock, and if
nessecary upgrade the lock to exclusive mode. To simplify this a bit
only take the ilock inside of xfs_file_aio_write_checks.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs/xfs/xfs_mount.c')
0 files changed, 0 insertions, 0 deletions