Skip to content

Commit

Permalink
autofs: switch to __vfs_write()
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
Al Viro committed Apr 12, 2015
1 parent 493c84c commit a35fb91
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fs/autofs4/autofs_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ void autofs4_clean_ino(struct autofs_info *);

static inline int autofs_prepare_pipe(struct file *pipe)
{
if (!pipe->f_op->write)
if (!(pipe->f_mode & FMODE_CAN_WRITE))
return -EINVAL;
if (!S_ISFIFO(file_inode(pipe)->i_mode))
return -EINVAL;
Expand Down
2 changes: 1 addition & 1 deletion fs/autofs4/waitq.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ static int autofs4_write(struct autofs_sb_info *sbi,

mutex_lock(&sbi->pipe_mutex);
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;
bytes -= wr;
}
Expand Down

0 comments on commit a35fb91

Please sign in to comment.