net/9p: switch p9_fd_read to kernel_write

Instead of playing with the addressing limits.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

authored by

Christoph Hellwig and committed by
Al Viro
670986ec b4bf802a

+2 -8
+2 -8
net/9p/trans_fd.c
··· 422 422 423 423 static int p9_fd_write(struct p9_client *client, void *v, int len) 424 424 { 425 - int ret; 426 - mm_segment_t oldfs; 425 + ssize_t ret; 427 426 struct p9_trans_fd *ts = NULL; 428 427 429 428 if (client && client->status != Disconnected) ··· 434 435 if (!(ts->wr->f_flags & O_NONBLOCK)) 435 436 p9_debug(P9_DEBUG_ERROR, "blocking write ...\n"); 436 437 437 - oldfs = get_fs(); 438 - set_fs(get_ds()); 439 - /* The cast to a user pointer is valid due to the set_fs() */ 440 - ret = vfs_write(ts->wr, (__force void __user *)v, len, &ts->wr->f_pos); 441 - set_fs(oldfs); 442 - 438 + ret = kernel_write(ts->wr, v, len, &ts->wr->f_pos); 443 439 if (ret <= 0 && ret != -ERESTARTSYS && ret != -EAGAIN) 444 440 client->status = Disconnected; 445 441 return ret;