net: introduce sk_gfp_atomic() to allow addition of GFP flags depending on the individual socket
Introduce sk_gfp_atomic(), this function allows to inject sock specific flags to each sock related allocation. It is only used on allocation paths that may be required for writing pages back to network storage. [davem@davemloft.net: Use sk_gfp_atomic only when necessary] Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Mel Gorman <mgorman@suse.de> Acked-by: David S. Miller <davem@davemloft.net> Cc: Neil Brown <neilb@suse.de> Cc: Mike Christie <michaelc@cs.wisc.edu> Cc: Eric B Munson <emunson@mgebm.net> Cc: Eric Dumazet <eric.dumazet@gmail.com> Cc: Sebastian Andrzej Siewior <sebastian@breakpoint.cc> Cc: Mel Gorman <mgorman@suse.de> Cc: Christoph Lameter <cl@linux.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:

committed by
Linus Torvalds

parent
183f6371aa
commit
99a1dec70d
@@ -658,6 +658,11 @@ static inline bool sock_flag(const struct sock *sk, enum sock_flags flag)
|
||||
return test_bit(flag, &sk->sk_flags);
|
||||
}
|
||||
|
||||
static inline gfp_t sk_gfp_atomic(struct sock *sk, gfp_t gfp_mask)
|
||||
{
|
||||
return GFP_ATOMIC;
|
||||
}
|
||||
|
||||
static inline void sk_acceptq_removed(struct sock *sk)
|
||||
{
|
||||
sk->sk_ack_backlog--;
|
||||
|
Reference in New Issue
Block a user