Allow mknod and mkfifo on SMB2/SMB3 mounts
[firefly-linux-kernel-4.4.55.git] / fs / cifs / file.c
index 8f7b40fd8f3ba2947b1fad3821e18ac02c0349ae..3e4d00a06c446b997750888bd080b9868a8771f9 100644 (file)
@@ -1687,8 +1687,8 @@ cifs_write(struct cifsFileInfo *open_file, __u32 pid, const char *write_data,
                        io_parms.tcon = tcon;
                        io_parms.offset = *offset;
                        io_parms.length = len;
-                       rc = server->ops->sync_write(xid, open_file, &io_parms,
-                                                    &bytes_written, iov, 1);
+                       rc = server->ops->sync_write(xid, &open_file->fid,
+                                       &io_parms, &bytes_written, iov, 1);
                }
                if (rc || (bytes_written == 0)) {
                        if (total_written)
@@ -3206,7 +3206,7 @@ cifs_read(struct file *file, char *read_data, size_t read_size, loff_t *offset)
                        io_parms.tcon = tcon;
                        io_parms.offset = *offset;
                        io_parms.length = current_read_size;
-                       rc = server->ops->sync_read(xid, open_file, &io_parms,
+                       rc = server->ops->sync_read(xid, &open_file->fid, &io_parms,
                                                    &bytes_read, &cur_offset,
                                                    &buf_type);
                } while (rc == -EAGAIN);