Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

RDS: use gfp flags from caller in conn_alloc()

We should be using the gfp flags the caller specified here, instead of
GFP_KERNEL. I think this might be a bugfix, depending on the value of
"sock->sk->sk_allocation" when we call rds_conn_create_outgoing() in
rds_sendmsg(). Otherwise, it's just a cleanup.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Venkat Venkatsubra <venkat.x.venkatsubra@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Dan Carpenter and committed by
David S. Miller
f0229eaa 64b5fad5

+3 -3
+1 -1
net/rds/ib_cm.c
··· 749 749 int ret; 750 750 751 751 /* XXX too lazy? */ 752 - ic = kzalloc(sizeof(struct rds_ib_connection), GFP_KERNEL); 752 + ic = kzalloc(sizeof(struct rds_ib_connection), gfp); 753 753 if (!ic) 754 754 return -ENOMEM; 755 755
+1 -1
net/rds/iw_cm.c
··· 694 694 unsigned long flags; 695 695 696 696 /* XXX too lazy? */ 697 - ic = kzalloc(sizeof(struct rds_iw_connection), GFP_KERNEL); 697 + ic = kzalloc(sizeof(struct rds_iw_connection), gfp); 698 698 if (!ic) 699 699 return -ENOMEM; 700 700
+1 -1
net/rds/loop.c
··· 121 121 struct rds_loop_connection *lc; 122 122 unsigned long flags; 123 123 124 - lc = kzalloc(sizeof(struct rds_loop_connection), GFP_KERNEL); 124 + lc = kzalloc(sizeof(struct rds_loop_connection), gfp); 125 125 if (!lc) 126 126 return -ENOMEM; 127 127