Commit a35fb914 authored by Al Viro's avatar Al Viro

autofs: switch to __vfs_write()

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 493c84c0
...@@ -213,7 +213,7 @@ void autofs4_clean_ino(struct autofs_info *); ...@@ -213,7 +213,7 @@ void autofs4_clean_ino(struct autofs_info *);
static inline int autofs_prepare_pipe(struct file *pipe) static inline int autofs_prepare_pipe(struct file *pipe)
{ {
if (!pipe->f_op->write) if (!(pipe->f_mode & FMODE_CAN_WRITE))
return -EINVAL; return -EINVAL;
if (!S_ISFIFO(file_inode(pipe)->i_mode)) if (!S_ISFIFO(file_inode(pipe)->i_mode))
return -EINVAL; return -EINVAL;
......
...@@ -70,7 +70,7 @@ static int autofs4_write(struct autofs_sb_info *sbi, ...@@ -70,7 +70,7 @@ static int autofs4_write(struct autofs_sb_info *sbi,
mutex_lock(&sbi->pipe_mutex); mutex_lock(&sbi->pipe_mutex);
while (bytes && while (bytes &&
(wr = file->f_op->write(file,data,bytes,&file->f_pos)) > 0) { (wr = __vfs_write(file,data,bytes,&file->f_pos)) > 0) {
data += wr; data += wr;
bytes -= wr; bytes -= wr;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment