Commit c18a6659 authored by Pavel Shilovsky's avatar Pavel Shilovsky

Update 3.2 sources from stable (v3.2.81)

parent d77f569f
......@@ -23,6 +23,8 @@
#ifndef _H_CIFS_DEBUG
#define _H_CIFS_DEBUG
#include <linux/ratelimit.h>
void cifs_dump_mem(char *label, void *data, int length);
#ifdef CONFIG_CIFS_DEBUG2
#define DBG2 2
......@@ -48,7 +50,7 @@ extern int cifsFYI;
#define cifsfyi(fmt, arg...) \
do { \
if (cifsFYI & CIFS_INFO) \
printk(KERN_DEBUG "%s: " fmt "\n", __FILE__, ##arg); \
pr_debug_ratelimited("%s: " fmt "\n", __FILE__, ##arg); \
} while (0)
#define cFYI(set, fmt, arg...) \
......@@ -58,7 +60,7 @@ do { \
} while (0)
#define cifswarn(fmt, arg...) \
printk(KERN_WARNING fmt "\n", ##arg)
pr_warn_ratelimited(fmt "\n", ##arg)
/* debug event message: */
extern int cifsERROR;
......@@ -73,7 +75,7 @@ do { \
#define cifserror(fmt, arg...) \
do { \
if (cifsERROR) \
printk(KERN_ERR "CIFS VFS: " fmt "\n", ##arg); \
pr_err_ratelimited("CIFS VFS: " fmt "\n", ##arg); \
} while (0)
#define cERROR(set, fmt, arg...) \
......
......@@ -616,7 +616,7 @@ setup_ntlmv2_rsp(struct cifs_ses *ses, const struct nls_table *nls_cp)
ses->auth_key.response = kmalloc(baselen + tilen, GFP_KERNEL);
if (!ses->auth_key.response) {
rc = ENOMEM;
rc = -ENOMEM;
ses->auth_key.len = 0;
cERROR(1, "%s: Can't allocate auth blob", __func__);
goto setup_ntlmv2_rsp_ret;
......
......@@ -134,7 +134,6 @@ cifs_reconnect(struct TCP_Server_Info *server)
server->session_key.response = NULL;
server->session_key.len = 0;
server->lstrp = jiffies;
mutex_unlock(&server->srv_mutex);
/* mark submitted MIDs for retry and issue callback */
INIT_LIST_HEAD(&retry_list);
......@@ -147,6 +146,7 @@ cifs_reconnect(struct TCP_Server_Info *server)
list_move(&mid_entry->qhead, &retry_list);
}
spin_unlock(&GlobalMid_Lock);
mutex_unlock(&server->srv_mutex);
cFYI(1, "%s: issuing mid callbacks", __func__);
list_for_each_safe(tmp, tmp2, &retry_list) {
......
......@@ -823,6 +823,7 @@ int cifs_readdir(struct file *file, void *direntry, filldir_t filldir)
}
/* if buggy server returns . and .. late do
we want to check for that here? */
*tmp_buf = 0;
rc = cifs_filldir(current_entry, file,
filldir, direntry, tmp_buf, max_len);
if (rc == -EOVERFLOW) {
......
......@@ -370,10 +370,8 @@ cifs_call_async(struct TCP_Server_Info *server, struct kvec *iov,
spin_unlock(&GlobalMid_Lock);
rc = cifs_sign_smb2(iov, nvec, server, &mid->sequence_number);
if (rc) {
mutex_unlock(&server->srv_mutex);
goto out_err;
}
if (rc)
goto out;
mid->receive = receive;
mid->callback = callback;
......@@ -384,14 +382,15 @@ cifs_call_async(struct TCP_Server_Info *server, struct kvec *iov,
rc = smb_sendv(server, iov, nvec);
cifs_in_send_dec(server);
cifs_save_when_sent(mid);
out:
if (rc < 0)
delete_mid(mid);
mutex_unlock(&server->srv_mutex);
if (rc)
goto out_err;
if (rc == 0)
return 0;
return rc;
out_err:
delete_mid(mid);
atomic_dec(&server->inFlight);
wake_up(&server->request_q);
return rc;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment