RDS: use gfp flags from caller in conn_alloc()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 21 Mar 2012 20:44:09 +0000 (20:44 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 22 Mar 2012 23:29:58 +0000 (19:29 -0400)
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>
net/rds/ib_cm.c
net/rds/iw_cm.c
net/rds/loop.c

index 51c868923f64d6a0e92fd741d73cd258fcc78089..a1e116277477541606e51e0c4af31aa53af4b673 100644 (file)
@@ -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;
 
index 9556d2895f7a35c72135989520a186618ed4e6bf..a91e1db62ee6a1833e65372989b0644d980899e6 100644 (file)
@@ -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;
 
index 87ff2a8a454b33fa32972bd83b84269cb077a74a..6b12b68541ae96fb8be76e72cb8d0e6f8c89abee 100644 (file)
@@ -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;