aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/lnet
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-09-01 17:39:22 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2017-09-04 19:05:16 -0400
commit8257723993e29335bcbd1912e6956357a5539976 (patch)
tree7eb245972cefc365763c1361734ae805e91e2616 /drivers/staging/lustre/lnet
parentgadget/f_mass_storage: stop messing with the address limit (diff)
downloadlinux-dev-8257723993e29335bcbd1912e6956357a5539976.tar.xz
linux-dev-8257723993e29335bcbd1912e6956357a5539976.zip
lustre: switch to kernel_write
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/staging/lustre/lnet')
-rw-r--r--drivers/staging/lustre/lnet/libcfs/tracefile.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/staging/lustre/lnet/libcfs/tracefile.c b/drivers/staging/lustre/lnet/libcfs/tracefile.c
index d1aa79bb2017..af61dd750033 100644
--- a/drivers/staging/lustre/lnet/libcfs/tracefile.c
+++ b/drivers/staging/lustre/lnet/libcfs/tracefile.c
@@ -731,8 +731,7 @@ int cfs_tracefile_dump_all_pages(char *filename)
__LASSERT_TAGE_INVARIANT(tage);
buf = kmap(tage->page);
- rc = vfs_write(filp, (__force const char __user *)buf,
- tage->used, &filp->f_pos);
+ rc = kernel_write(filp, buf, tage->used, &filp->f_pos);
kunmap(tage->page);
if (rc != (int)tage->used) {
@@ -976,7 +975,6 @@ static int tracefiled(void *arg)
struct tracefiled_ctl *tctl = arg;
struct cfs_trace_page *tage;
struct cfs_trace_page *tmp;
- mm_segment_t __oldfs;
struct file *filp;
char *buf;
int last_loop = 0;
@@ -1014,8 +1012,6 @@ static int tracefiled(void *arg)
__LASSERT(list_empty(&pc.pc_pages));
goto end_loop;
}
- __oldfs = get_fs();
- set_fs(get_ds());
list_for_each_entry_safe(tage, tmp, &pc.pc_pages, linkage) {
static loff_t f_pos;
@@ -1028,8 +1024,7 @@ static int tracefiled(void *arg)
f_pos = i_size_read(file_inode(filp));
buf = kmap(tage->page);
- rc = vfs_write(filp, (__force const char __user *)buf,
- tage->used, &f_pos);
+ rc = kernel_write(filp, buf, tage->used, &f_pos);
kunmap(tage->page);
if (rc != (int)tage->used) {
@@ -1040,7 +1035,6 @@ static int tracefiled(void *arg)
break;
}
}
- set_fs(__oldfs);
filp_close(filp, NULL);
put_pages_on_daemon_list(&pc);