Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f0229eaa authored by Dan Carpenter's avatar Dan Carpenter Committed by David S. Miller
Browse files

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarVenkat Venkatsubra <venkat.x.venkatsubra@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 64b5fad5
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -749,7 +749,7 @@ int rds_ib_conn_alloc(struct rds_connection *conn, gfp_t gfp)
	int ret;
	int ret;


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


+1 −1
Original line number Original line Diff line number Diff line
@@ -694,7 +694,7 @@ int rds_iw_conn_alloc(struct rds_connection *conn, gfp_t gfp)
	unsigned long flags;
	unsigned long flags;


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


+1 −1
Original line number Original line Diff line number Diff line
@@ -121,7 +121,7 @@ static int rds_loop_conn_alloc(struct rds_connection *conn, gfp_t gfp)
	struct rds_loop_connection *lc;
	struct rds_loop_connection *lc;
	unsigned long flags;
	unsigned long flags;


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