path: root/fs/nfs/direct.c
diff options
authorLinus Torvalds <torvalds@linux-foundation.org>2015-01-29 15:18:12 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2015-01-29 15:18:12 -0800
commit353a0c6fcc957939c58cadbd342870445f996a7a (patch)
treeeca68c3825feeaa7da5aa2710e3feb922e4cc047 /fs/nfs/direct.c
parent884e00f37d8b8464de6b1a5ee456957e530d6d8a (diff)
parent2ef47eb1aee171ecf1d83311b9f7fae80f330181 (diff)
Merge tag 'nfs-for-3.19-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Pull NFS client bugfixes from Trond Myklebust: "Highlights include: - Stable fix for a NFSv4.1 Oops on mount - Stable fix for an O_DIRECT deadlock condition - Fix an issue with submounted volumes and fake duplicate inode numbers" * tag 'nfs-for-3.19-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: NFS: Fix use of nfs_attr_use_mounted_on_fileid() NFSv4.1: Fix an Oops in nfs41_walk_client_list nfs: fix dio deadlock when O_DIRECT flag is flipped
Diffstat (limited to 'fs/nfs/direct.c')
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c
index 10bf07280f4a..294692ff83b1 100644
--- a/fs/nfs/direct.c
+++ b/fs/nfs/direct.c
@@ -212,6 +212,12 @@ static int nfs_direct_cmp_commit_data_verf(struct nfs_direct_req *dreq,
ssize_t nfs_direct_IO(int rw, struct kiocb *iocb, struct iov_iter *iter, loff_t pos)
+ struct inode *inode = iocb->ki_filp->f_mapping->host;
+ /* we only support swap file calling nfs_direct_IO */
+ if (!IS_SWAPFILE(inode))
+ return 0;
dprintk("NFS: nfs_direct_IO (%pD) off/no(%Ld/%lu) EINVAL\n",
iocb->ki_filp, (long long) pos, iter->nr_segs);