From a35fb914ae62a58ca7519778fffac722c6ae255f Mon Sep 17 00:00:00 2001 From: Al Viro Date: Fri, 3 Apr 2015 15:07:48 -0400 Subject: [PATCH] autofs: switch to __vfs_write() Signed-off-by: Al Viro --- fs/autofs4/autofs_i.h | 2 +- fs/autofs4/waitq.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/autofs4/autofs_i.h b/fs/autofs4/autofs_i.h index 8e98cf954bab..d10e619632ab 100644 --- a/fs/autofs4/autofs_i.h +++ b/fs/autofs4/autofs_i.h @@ -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; diff --git a/fs/autofs4/waitq.c b/fs/autofs4/waitq.c index 116fd38ee472..2ad05ab93db8 100644 --- a/fs/autofs4/waitq.c +++ b/fs/autofs4/waitq.c @@ -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; } -- 2.20.1