diff options
author | Christoph Hellwig <hch@lst.de> | 2017-09-01 17:39:10 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2017-09-04 19:05:15 -0400 |
commit | 317d5a5f0f8fcc084d02c776c602c64a5b94e47b (patch) | |
tree | 27a93f7ac8f0473adacb81188b74365c63524b10 /fs/autofs4 | |
parent | 8a2af06415ef0fc922162503dd18da0d9be7771f (diff) | |
download | linux-317d5a5f0f8fcc084d02c776c602c64a5b94e47b.tar.bz2 |
autofs4: switch autofs4_write to __kernel_write
Instead of playing games with the address limit..
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/autofs4')
-rw-r--r-- | fs/autofs4/waitq.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/fs/autofs4/waitq.c b/fs/autofs4/waitq.c index 24a58bf9ca72..4ac49d038bf3 100644 --- a/fs/autofs4/waitq.c +++ b/fs/autofs4/waitq.c @@ -56,19 +56,14 @@ static int autofs4_write(struct autofs_sb_info *sbi, struct file *file, const void *addr, int bytes) { unsigned long sigpipe, flags; - mm_segment_t fs; const char *data = (const char *)addr; ssize_t wr = 0; sigpipe = sigismember(¤t->pending.signal, SIGPIPE); - /* Save pointer to user space and point back to kernel space */ - fs = get_fs(); - set_fs(KERNEL_DS); - mutex_lock(&sbi->pipe_mutex); while (bytes) { - wr = __vfs_write(file, data, bytes, &file->f_pos); + wr = __kernel_write(file, data, bytes, &file->f_pos); if (wr <= 0) break; data += wr; @@ -76,8 +71,6 @@ static int autofs4_write(struct autofs_sb_info *sbi, } mutex_unlock(&sbi->pipe_mutex); - set_fs(fs); - /* Keep the currently executing process from receiving a * SIGPIPE unless it was already supposed to get one */ |