aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorMartin K. Petersen <martin.petersen@oracle.com>2014-10-14 11:00:44 -0400
committerJens Axboe <axboe@fb.com>2014-10-14 11:00:44 -0400
commite19a8a0ad2d255316830ead05b59c5a704434cbb (patch)
tree6e3ac65cc0fb73eba324cb2fd75923973c241ade /fs
parenta86073e48ae85c9b50127facb0cc45bbd35972a1 (diff)
block: Remove REQ_KERNEL
REQ_KERNEL is no longer used. Remove it and drop the redundant uio argument to nfs_file_direct_{read,write}. Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Cc: Christoph Hellwig <hch@infradead.org> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/direct.c12
-rw-r--r--fs/nfs/file.c4
2 files changed, 7 insertions, 9 deletions
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c
index 65ef6e00deee..891f7dd8cbd6 100644
--- a/fs/nfs/direct.c
+++ b/fs/nfs/direct.c
@@ -222,11 +222,9 @@ ssize_t nfs_direct_IO(int rw, struct kiocb *iocb, struct iov_iter *iter, loff_t
222#else 222#else
223 VM_BUG_ON(iocb->ki_nbytes != PAGE_SIZE); 223 VM_BUG_ON(iocb->ki_nbytes != PAGE_SIZE);
224 224
225 if (rw == READ || rw == KERNEL_READ) 225 if (rw == READ)
226 return nfs_file_direct_read(iocb, iter, pos, 226 return nfs_file_direct_read(iocb, iter, pos);
227 rw == READ ? true : false); 227 return nfs_file_direct_write(iocb, iter, pos);
228 return nfs_file_direct_write(iocb, iter, pos,
229 rw == WRITE ? true : false);
230#endif /* CONFIG_NFS_SWAP */ 228#endif /* CONFIG_NFS_SWAP */
231} 229}
232 230
@@ -512,7 +510,7 @@ static ssize_t nfs_direct_read_schedule_iovec(struct nfs_direct_req *dreq,
512 * cache. 510 * cache.
513 */ 511 */
514ssize_t nfs_file_direct_read(struct kiocb *iocb, struct iov_iter *iter, 512ssize_t nfs_file_direct_read(struct kiocb *iocb, struct iov_iter *iter,
515 loff_t pos, bool uio) 513 loff_t pos)
516{ 514{
517 struct file *file = iocb->ki_filp; 515 struct file *file = iocb->ki_filp;
518 struct address_space *mapping = file->f_mapping; 516 struct address_space *mapping = file->f_mapping;
@@ -893,7 +891,7 @@ static ssize_t nfs_direct_write_schedule_iovec(struct nfs_direct_req *dreq,
893 * is no atomic O_APPEND write facility in the NFS protocol. 891 * is no atomic O_APPEND write facility in the NFS protocol.
894 */ 892 */
895ssize_t nfs_file_direct_write(struct kiocb *iocb, struct iov_iter *iter, 893ssize_t nfs_file_direct_write(struct kiocb *iocb, struct iov_iter *iter,
896 loff_t pos, bool uio) 894 loff_t pos)
897{ 895{
898 ssize_t result = -EINVAL; 896 ssize_t result = -EINVAL;
899 struct file *file = iocb->ki_filp; 897 struct file *file = iocb->ki_filp;
diff --git a/fs/nfs/file.c b/fs/nfs/file.c
index 524dd80d1898..3b42cb86218e 100644
--- a/fs/nfs/file.c
+++ b/fs/nfs/file.c
@@ -171,7 +171,7 @@ nfs_file_read(struct kiocb *iocb, struct iov_iter *to)
171 ssize_t result; 171 ssize_t result;
172 172
173 if (iocb->ki_filp->f_flags & O_DIRECT) 173 if (iocb->ki_filp->f_flags & O_DIRECT)
174 return nfs_file_direct_read(iocb, to, iocb->ki_pos, true); 174 return nfs_file_direct_read(iocb, to, iocb->ki_pos);
175 175
176 dprintk("NFS: read(%pD2, %zu@%lu)\n", 176 dprintk("NFS: read(%pD2, %zu@%lu)\n",
177 iocb->ki_filp, 177 iocb->ki_filp,
@@ -648,7 +648,7 @@ ssize_t nfs_file_write(struct kiocb *iocb, struct iov_iter *from)
648 return result; 648 return result;
649 649
650 if (file->f_flags & O_DIRECT) 650 if (file->f_flags & O_DIRECT)
651 return nfs_file_direct_write(iocb, from, pos, true); 651 return nfs_file_direct_write(iocb, from, pos);
652 652
653 dprintk("NFS: write(%pD2, %zu@%Ld)\n", 653 dprintk("NFS: write(%pD2, %zu@%Ld)\n",
654 file, count, (long long) pos); 654 file, count, (long long) pos);