/*- * Windows only supports a max of 60k reads. Default to that when posix- * extensions aren't in force.+ * Windows only supports a max of 60kb reads and 65535 byte writes. Default to+ * those values when posix extensions aren't in force. In actuality here, we+ * use 65536 to allow for a write that is a multiple of 4k. Most servers seem+ * to be ok with the extra byte even though Windows doesn't send writes that+ * are that large.+ *+ * Citation:+ *+ * http://blogs.msdn.com/b/openspecification/archive/2009/04/10/smb-maximum-transmit-buffer-size-and-performance-tuning.aspx */ #define CIFS_DEFAULT_NON_POSIX_RSIZE (60 * 1024)+#define CIFS_DEFAULT_NON_POSIX_WSIZE (65536)

/*- * DBGKEY macros require @dbg_lock to be held, which it is in the dbg message- * macros.+ * TODO: these macros are now broken because there is no locking around them+ * and we use a global buffer for the key string. This means that in case of+ * concurrent execution we will end up with incorrect and messy key strings. */ #define DBGKEY(key) dbg_key_str0(c, (key)) #define DBGKEY1(key) dbg_key_str1(c, (key))

/*- * If we are enabling tracing:+ * If we are updating calls: * * If the record has a ref count, then we need to enable it * because someone is using it. * * Otherwise we make sure its disabled. *- * If we are disabling tracing, then disable all records that+ * If we are disabling calls, then disable all records that * are enabled. */- if (enable && (rec->flags & ~FTRACE_FL_MASK))+ if (update && (rec->flags & ~FTRACE_FL_MASK)) flag = FTRACE_FL_ENABLED;

/* If the state of this record hasn't changed, then do nothing */@@ -1553,7 +1553,7 @@ __ftrace_replace_code(struct dyn_ftrace *rec, int enable) return ftrace_make_nop(NULL, rec, ftrace_addr); }

- /* We always want to use off-channel PS, even if we- * are not really leaving oper-channel. Don't- * tell the AP though, as long as we are on-channel.- */- ieee80211_offchannel_enable_all_ps(local, false);+ drv_flush(local, false);

del_timer_sync(&serv->sv_temptimer);-- svc_close_all(&serv->sv_tempsocks);+ /*+ * The set of xprts (contained in the sv_tempsocks and+ * sv_permsocks lists) is now constant, since it is modified+ * only by accepting new sockets (done by service threads in+ * svc_recv) or aging old ones (done by sv_temptimer), or+ * configuration changes (excluded by whatever locking the+ * caller is using--nfsd_mutex in the case of nfsd). So it's+ * safe to traverse those lists and shut everything down:+ */+ svc_close_all(serv);

if (svc_serv_is_pooled(serv))diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.cindex 447cd0e..9ed2cd0 100644--- a/net/sunrpc/svc_xprt.c+++ b/net/sunrpc/svc_xprt.c@@ -893,14 +893,7 @@ void svc_delete_xprt(struct svc_xprt *xprt) spin_lock_bh(&serv->sv_lock); if (!test_and_set_bit(XPT_DETACHED, &xprt->xpt_flags)) list_del_init(&xprt->xpt_list);- /*- * The only time we're called while xpt_ready is still on a list- * is while the list itself is about to be destroyed (in- * svc_destroy). BUT svc_xprt_enqueue could still be attempting- * to add new entries to the sp_sockets list, so we can't leave- * a freed xprt on it.- */- list_del_init(&xprt->xpt_ready);+ BUG_ON(!list_empty(&xprt->xpt_ready)); if (test_bit(XPT_TEMP, &xprt->xpt_flags)) serv->sv_tmpcnt--; spin_unlock_bh(&serv->sv_lock);@@ -928,22 +921,48 @@ void svc_close_xprt(struct svc_xprt *xprt) } EXPORT_SYMBOL_GPL(svc_close_xprt);