[XFS] Fix race in xfs_write() b/w dmapi callout and direct I/O checks.
authorLachlan McIlroy <lachlan@sgi.com>
Tue, 8 May 2007 03:50:12 +0000 (13:50 +1000)
committerTim Shimmin <tes@sgi.com>
Tue, 8 May 2007 03:50:12 +0000 (13:50 +1000)
commit71dfd5a396d11512aa6c8ed0d35b268bc084bb9b
tree843b46b1e42df50707c160650695e074f1e8d7f6
parent3a02ee1828915d6540b415a160344775e2a4f918
[XFS] Fix race in xfs_write() b/w dmapi callout and direct I/O checks.

In xfs_write() the iolock is dropped and reacquired in XFS_SEND_DATA()
which means that the file could change from not-cached to cached and we
need to redo the direct I/O checks. We should also redo the direct I/O
checks when the file size changes regardless if O_APPEND is set or not.

SGI-PV: 963483
SGI-Modid: xfs-linux-melb:xfs-kern:28440a

Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
fs/xfs/linux-2.6/xfs_lrw.c