> #ifdef CONFIG_CIFS_STATS2
> atomic_inc(&server->num_waiters);
> @@ -283,6 +284,20 @@ static int wait_for_free_request(struct
> TCP_Server_Info *server,
> atomic_dec(&server->num_waiters);
> #endif
> spin_lock(&GlobalMid_Lock);
> +#ifdef CONFIG_CIFS_SMB2
> + } else if (server->is_smb2 &&
> + (atomic_read(&server->credits) < 1)) {
> + spin_unlock(&GlobalMid_Lock);
> +#ifdef CONFIG_CIFS_STATS2
> + atomic_inc(&server->num_waiters);
> +#endif
> + wait_event(server->request_q,
> + atomic_read(&server->credits) > 0);
> +#ifdef CONFIG_CIFS_STATS2
> + atomic_dec(&server->num_waiters);
> +#endif
> + spin_lock(&GlobalMid_Lock);
> +#endif /* CONFIG_CIFS_SMB2 */
This ifdef mania is madness. Please make sure to hide the stats
and smb2 code in properly abstracted helpers that get compiled out if
not actually used.
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html