Linux NFS development
 help / color / mirror / Atom feed
* [PATCH] nfs: clean up nfs_direct_IO
@ 2015-01-20 16:20 Peng Tao
  0 siblings, 0 replies; only message in thread
From: Peng Tao @ 2015-01-20 16:20 UTC (permalink / raw)
  To: linux-nfs; +Cc: Trond Myklebust, Peng Tao

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>
---
 fs/nfs/direct.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c
index 1184118..645b777 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)
-- 
1.9.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-01-20 16:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-20 16:20 [PATCH] nfs: clean up nfs_direct_IO Peng Tao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox