Skip to content

Commit

Permalink
RDS: use gfp flags from caller in conn_alloc()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and David S. Miller committed Mar 22, 2012
1 parent 64b5fad commit f0229ea
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion net/rds/ib_cm.c
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@ int rds_ib_conn_alloc(struct rds_connection *conn, gfp_t gfp)
int ret;

/* XXX too lazy? */
ic = kzalloc(sizeof(struct rds_ib_connection), GFP_KERNEL);
ic = kzalloc(sizeof(struct rds_ib_connection), gfp);
if (!ic)
return -ENOMEM;

Expand Down
2 changes: 1 addition & 1 deletion net/rds/iw_cm.c
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ int rds_iw_conn_alloc(struct rds_connection *conn, gfp_t gfp)
unsigned long flags;

/* XXX too lazy? */
ic = kzalloc(sizeof(struct rds_iw_connection), GFP_KERNEL);
ic = kzalloc(sizeof(struct rds_iw_connection), gfp);
if (!ic)
return -ENOMEM;

Expand Down
2 changes: 1 addition & 1 deletion net/rds/loop.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ static int rds_loop_conn_alloc(struct rds_connection *conn, gfp_t gfp)
struct rds_loop_connection *lc;
unsigned long flags;

lc = kzalloc(sizeof(struct rds_loop_connection), GFP_KERNEL);
lc = kzalloc(sizeof(struct rds_loop_connection), gfp);
if (!lc)
return -ENOMEM;

Expand Down

0 comments on commit f0229ea

Please sign in to comment.