autofs: switch to __vfs_write()
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 3 Apr 2015 19:07:48 +0000 (15:07 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Sun, 12 Apr 2015 02:29:37 +0000 (22:29 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/autofs4/autofs_i.h
fs/autofs4/waitq.c

index 8e98cf954babb8944a32fdc58fd3c38760933a5a..d10e619632ab48b30390062455eef4b543b7c183 100644 (file)
@@ -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;
index 116fd38ee472c74f243c05428969c2bd1bbe85e2..2ad05ab93db86efe0e4d0432b7ed8f1f37a0dd52 100644 (file)
@@ -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;
        }