diff options
| author | Peng Tao <tao.peng@primarydata.com> | 2015-01-20 07:44:29 +0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-02-05 22:35:36 -0800 |
| commit | 8e70c526add70fd1aad3b5c12c9ca56a8e7b63ef (patch) | |
| tree | 615d108e1c5be2130e034277a645f8632dc08598 /kernel/sysctl_binary.c | |
| parent | b15f0c0f6f989d3dd7b94db772c08d18350fd235 (diff) | |
nfs: fix dio deadlock when O_DIRECT flag is flipped
commit ee8a1a8b160a87dc3a9c81a86796aa4db85ea815 upstream.
We only support swap file calling nfs_direct_IO. However, application
might be able to get to nfs_direct_IO if it toggles O_DIRECT flag
during IO and it can deadlock because we grab inode->i_mutex in
nfs_file_direct_write(). So return 0 for such case. Then the generic
layer will fall back to buffer IO.
Signed-off-by: Peng Tao <tao.peng@primarydata.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/sysctl_binary.c')
0 files changed, 0 insertions, 0 deletions
