OSDN Git Service

Merge 4.4.123 into android-4.4
[sagit-ice-cold/kernel_xiaomi_msm8998.git] / include / net / tcp.h
index 593253f..a435427 100644 (file)
@@ -1202,9 +1202,11 @@ void tcp_select_initial_window(int __space, __u32 mss, __u32 *rcv_wnd,
 
 static inline int tcp_win_from_space(int space)
 {
-       return sysctl_tcp_adv_win_scale<=0 ?
-               (space>>(-sysctl_tcp_adv_win_scale)) :
-               space - (space>>sysctl_tcp_adv_win_scale);
+       int tcp_adv_win_scale = sysctl_tcp_adv_win_scale;
+
+       return tcp_adv_win_scale <= 0 ?
+               (space>>(-tcp_adv_win_scale)) :
+               space - (space>>tcp_adv_win_scale);
 }
 
 /* Note: caller must be prepared to deal with negative returns */