Skip to content

Commit f0229ea

Browse files
Dan Carpenterdavem330
authored andcommitted
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>
1 parent 64b5fad commit f0229ea

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎net/rds/ib_cm.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -749,7 +749,7 @@ int rds_ib_conn_alloc(struct rds_connection *conn, gfp_t gfp)
749749
int ret;
750750

751751
/* XXX too lazy? */
752-
ic = kzalloc(sizeof(struct rds_ib_connection), GFP_KERNEL);
752+
ic = kzalloc(sizeof(struct rds_ib_connection), gfp);
753753
if (!ic)
754754
return -ENOMEM;
755755

‎net/rds/iw_cm.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,7 @@ int rds_iw_conn_alloc(struct rds_connection *conn, gfp_t gfp)
694694
unsigned long flags;
695695

696696
/* XXX too lazy? */
697-
ic = kzalloc(sizeof(struct rds_iw_connection), GFP_KERNEL);
697+
ic = kzalloc(sizeof(struct rds_iw_connection), gfp);
698698
if (!ic)
699699
return -ENOMEM;
700700

‎net/rds/loop.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ static int rds_loop_conn_alloc(struct rds_connection *conn, gfp_t gfp)
121121
struct rds_loop_connection *lc;
122122
unsigned long flags;
123123

124-
lc = kzalloc(sizeof(struct rds_loop_connection), GFP_KERNEL);
124+
lc = kzalloc(sizeof(struct rds_loop_connection), gfp);
125125
if (!lc)
126126
return -ENOMEM;
127127

0 commit comments

Comments
 (0)