summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorPeng Tao <tao.peng@primarydata.com>2015-01-21 00:20:11 +0800
committerTrond Myklebust <trond.myklebust@primarydata.com>2015-03-13 09:05:25 -0400
commit2854475f6c612d59901d51c358abd05643278b53 (patch)
tree40b89df67f9f04b080ba4fdd553cbcfbcea99009 /fs
parent55cc1d7806cd4827d38a18ddf3bcf04706758218 (diff)
downloadlinux-stable-2854475f6c612d59901d51c358abd05643278b53.tar.gz
linux-stable-2854475f6c612d59901d51c358abd05643278b53.tar.bz2
linux-stable-2854475f6c612d59901d51c358abd05643278b53.zip
nfs: clean up nfs_direct_IO
This follows up "nfs: fix dio deadlock when O_DIRECT flag is flipped" and removes the unnecessary CONFIG_NFS_SWAP switch. Signed-off-by: Peng Tao <tao.peng@primarydata.com> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/direct.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c
index e907c8cf732e..51f617e45fd1 100644
--- a/fs/nfs/direct.c
+++ b/fs/nfs/direct.c
@@ -259,18 +259,11 @@ ssize_t nfs_direct_IO(int rw, struct kiocb *iocb, struct iov_iter *iter, loff_t
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);
-
- return -EINVAL;
-#else
VM_BUG_ON(iocb->ki_nbytes != PAGE_SIZE);
if (rw == READ)
return nfs_file_direct_read(iocb, iter, pos);
return nfs_file_direct_write(iocb, iter, pos);
-#endif /* CONFIG_NFS_SWAP */
}
static void nfs_direct_release_pages(struct page **pages, unsigned int npages)