Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1725175
| From | Christoph Hellwig <hch@lst.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 12/17] mconsole: switch to kernel_read |
| Date | 2017-09-01 17:50 +0200 |
| Message-ID | <ukWmN-71s-61@gated-at.bofh.it> (permalink) |
| References | <ukWd4-6Xx-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Instead of playing with address limits.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
arch/um/drivers/mconsole_kern.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/arch/um/drivers/mconsole_kern.c b/arch/um/drivers/mconsole_kern.c
index af326fb6510d..c4d162a94be9 100644
--- a/arch/um/drivers/mconsole_kern.c
+++ b/arch/um/drivers/mconsole_kern.c
@@ -148,12 +148,7 @@ void mconsole_proc(struct mc_request *req)
}
do {
- loff_t pos = file->f_pos;
- mm_segment_t old_fs = get_fs();
- set_fs(KERNEL_DS);
- len = vfs_read(file, buf, PAGE_SIZE - 1, &pos);
- set_fs(old_fs);
- file->f_pos = pos;
+ len = kernel_read(file, buf, PAGE_SIZE - 1, &file->f_pos);
if (len < 0) {
mconsole_reply(req, "Read of file failed", 1, 0);
goto out_free;
--
2.11.0
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
switch in-kernel read/write calls to kernel_read/write V2 Christoph Hellwig <hch@lst.de> - 2017-09-01 17:40 +0200
[PATCH 01/17] ashmem: switch to ->read_iter Christoph Hellwig <hch@lst.de> - 2017-09-01 17:40 +0200
[PATCH 06/17] fs: fix kernel_write prototype Christoph Hellwig <hch@lst.de> - 2017-09-01 17:40 +0200
[PATCH 04/17] fs: move kernel_read to fs/read_write.c Christoph Hellwig <hch@lst.de> - 2017-09-01 17:40 +0200
[PATCH 03/17] fs: move kernel_write to fs/read_write.c Christoph Hellwig <hch@lst.de> - 2017-09-01 17:40 +0200
[PATCH 15/17] fs: unexport __vfs_read/__vfs_write Christoph Hellwig <hch@lst.de> - 2017-09-01 17:50 +0200
[PATCH 16/17] fs: unexport vfs_read and vfs_write Christoph Hellwig <hch@lst.de> - 2017-09-01 17:50 +0200
[PATCH 07/17] fs: make the buf argument to __kernel_write a void pointer Christoph Hellwig <hch@lst.de> - 2017-09-01 17:50 +0200
[PATCH 14/17] lustre: switch to kernel_write Christoph Hellwig <hch@lst.de> - 2017-09-01 17:50 +0200
[PATCH 02/17] autofs4: switch autofs4_write to __kernel_write Christoph Hellwig <hch@lst.de> - 2017-09-01 17:50 +0200
[PATCH 10/17] net/9p: switch p9_fd_read to kernel_write Christoph Hellwig <hch@lst.de> - 2017-09-01 17:50 +0200
[PATCH 09/17] mm/nommu: switch do_mmap_private to kernel_read Christoph Hellwig <hch@lst.de> - 2017-09-01 17:50 +0200
[PATCH 05/17] fs: fix kernel_read prototype Christoph Hellwig <hch@lst.de> - 2017-09-01 17:50 +0200
[PATCH 13/17] gadget/f_mass_storage: stop messing with the address limit Christoph Hellwig <hch@lst.de> - 2017-09-01 17:50 +0200
[PATCH 12/17] mconsole: switch to kernel_read Christoph Hellwig <hch@lst.de> - 2017-09-01 17:50 +0200
[PATCH 08/17] serial2002: switch serial2002_tty_write to kernel_{read/write} Christoph Hellwig <hch@lst.de> - 2017-09-01 17:50 +0200
[PATCH 17/17] fs: unexport vfs_readv and vfs_writev Christoph Hellwig <hch@lst.de> - 2017-09-01 17:50 +0200
[PATCH 11/17] btrfs: switch write_buf to kernel_write Christoph Hellwig <hch@lst.de> - 2017-09-01 17:50 +0200
csiph-web