RDS: make sure all sgs alloced are initialized

rds_message_alloc_sgs() now returns correctly-initialized
sg lists, so calleds need not do this themselves.

Signed-off-by: Andy Grover <andy.grover@oracle.com>
This commit is contained in:
Andy Grover
2010-01-12 14:17:31 -08:00
parent ff87e97a9d
commit f4dd96f7b2
2 changed files with 2 additions and 3 deletions

View File

@@ -534,14 +534,13 @@ static int rds_rdma_prepare(struct rds_message *rm,
goto out;
}
op->r_sg = rds_message_alloc_sgs(rm, nr_pages);
op->r_write = !!(args->flags & RDS_RDMA_READWRITE);
op->r_fence = !!(args->flags & RDS_RDMA_FENCE);
op->r_notify = !!(args->flags & RDS_RDMA_NOTIFY_ME);
op->r_active = 1;
op->r_recverr = rs->rs_recverr;
WARN_ON(!nr_pages);
sg_init_table(op->r_sg, nr_pages);
op->r_sg = rds_message_alloc_sgs(rm, nr_pages);
if (op->r_notify || op->r_recverr) {
/* We allocate an uninitialized notifier here, because