CIFS: Reconnect durable handles for SMB2
[platform/adaptation/renesas_rcar/renesas_kernel.git] / fs / cifs / dir.c
index 5699b50..d62ce0d 100644 (file)
@@ -204,6 +204,7 @@ cifs_do_create(struct inode *inode, struct dentry *direntry, unsigned int xid,
        struct inode *newinode = NULL;
        int disposition;
        struct TCP_Server_Info *server = tcon->ses->server;
+       struct cifs_open_parms oparms;
 
        *oplock = 0;
        if (tcon->ses->server->oplocks)
@@ -319,9 +320,16 @@ cifs_do_create(struct inode *inode, struct dentry *direntry, unsigned int xid,
        if (backup_cred(cifs_sb))
                create_options |= CREATE_OPEN_BACKUP_INTENT;
 
-       rc = server->ops->open(xid, tcon, full_path, disposition,
-                              desired_access, create_options, fid, oplock,
-                              buf, cifs_sb);
+       oparms.tcon = tcon;
+       oparms.cifs_sb = cifs_sb;
+       oparms.desired_access = desired_access;
+       oparms.create_options = create_options;
+       oparms.disposition = disposition;
+       oparms.path = full_path;
+       oparms.fid = fid;
+       oparms.reconnect = false;
+
+       rc = server->ops->open(xid, &oparms, oplock, buf);
        if (rc) {
                cifs_dbg(FYI, "cifs_create returned 0x%x\n", rc);
                goto out;
@@ -822,8 +830,7 @@ const struct dentry_operations cifs_dentry_ops = {
 /* d_delete:       cifs_d_delete,      */ /* not needed except for debugging */
 };
 
-static int cifs_ci_hash(const struct dentry *dentry, const struct inode *inode,
-               struct qstr *q)
+static int cifs_ci_hash(const struct dentry *dentry, struct qstr *q)
 {
        struct nls_table *codepage = CIFS_SB(dentry->d_sb)->local_nls;
        unsigned long hash;
@@ -838,12 +845,10 @@ static int cifs_ci_hash(const struct dentry *dentry, const struct inode *inode,
        return 0;
 }
 
-static int cifs_ci_compare(const struct dentry *parent,
-               const struct inode *pinode,
-               const struct dentry *dentry, const struct inode *inode,
+static int cifs_ci_compare(const struct dentry *parent, const struct dentry *dentry,
                unsigned int len, const char *str, const struct qstr *name)
 {
-       struct nls_table *codepage = CIFS_SB(pinode->i_sb)->local_nls;
+       struct nls_table *codepage = CIFS_SB(parent->d_sb)->local_nls;
 
        if ((name->len == len) &&
            (nls_strnicmp(codepage, name->name, str, len) == 0))