aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/direct.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2015-02-04 07:53:17 +0100
committerIngo Molnar <mingo@kernel.org>2015-02-04 07:53:17 +0100
commit2622e849a1d3d3ef531d1cc33308bb7fd00eee40 (patch)
treef2be9d9f08444cb93b3a8f87099fe4ff8ac3cd57 /fs/nfs/direct.c
parent996636ddae5cab8883bd76b996cd4f2ea9a152be (diff)
parente36f014edff70fc02b3d3d79cead1d58f289332e (diff)
downloadkernel_replicant_linux-2622e849a1d3d3ef531d1cc33308bb7fd00eee40.tar.gz
kernel_replicant_linux-2622e849a1d3d3ef531d1cc33308bb7fd00eee40.tar.bz2
kernel_replicant_linux-2622e849a1d3d3ef531d1cc33308bb7fd00eee40.zip
Merge tag 'v3.19-rc7' into locking/core, to refresh the branch before applying new changes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'fs/nfs/direct.c')
-rw-r--r--fs/nfs/direct.c6
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;
+
#ifndef CONFIG_NFS_SWAP
dprintk("NFS: nfs_direct_IO (%pD) off/no(%Ld/%lu) EINVAL\n",
iocb->ki_filp, (long long) pos, iter->nr_segs);