]> git.baikalelectronics.ru Git - kernel.git/commit
mlx4: Correct error flows in rereg_mr
authorMatan Barak <matanb@mellanox.com>
Thu, 11 Sep 2014 10:18:37 +0000 (13:18 +0300)
committerRoland Dreier <roland@purestorage.com>
Mon, 22 Sep 2014 15:47:47 +0000 (08:47 -0700)
commit2d48fb8e9b28da814fec250fc1dd7f40654fc09c
tree10db33af6a400a7863ee1868058ed05d55823cd8
parent8a2cc63a22f3be5b207f42eb37277777ec826955
mlx4: Correct error flows in rereg_mr

This patch addresses feedback from Sagi Grimberg on the rereg_mr
implementation of mlx4.  The following are fixed:

1. Set the correct pd_flags
2. Make sure we change the iova and size MR fields only after
   successful write and allocation of the MTTs.
3. Make the error checking more robust

Fixes: ec4be9f9ae45 ("mlx4_core: Add helper functions to support MR re-registration")
Signed-off-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/hw/mlx4/mr.c
drivers/net/ethernet/mellanox/mlx4/mr.c