Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a2cb4a98f243d01f2c8d5799c764bb96ffa66c44 Commit: a2cb4a98f243d01f2c8d5799c764bb96ffa66c44 Parent: d998ccce020e2cfcf11c6b57503532930ede2894 Author: Roland Dreier <[EMAIL PROTECTED]> AuthorDate: Tue May 29 16:07:09 2007 -0700 Committer: Roland Dreier <[EMAIL PROTECTED]> CommitDate: Tue May 29 16:07:09 2007 -0700
IB/mlx4: Fix last allocated object tracking in bitmap allocator Set last allocated object to the object after the one just allocated before ORing in the extra top bits. Also handle the case where this wraps around. Signed-off-by: Roland Dreier <[EMAIL PROTECTED]> --- drivers/net/mlx4/alloc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/mlx4/alloc.c b/drivers/net/mlx4/alloc.c index dfbd580..f8d63d3 100644 --- a/drivers/net/mlx4/alloc.c +++ b/drivers/net/mlx4/alloc.c @@ -51,8 +51,8 @@ u32 mlx4_bitmap_alloc(struct mlx4_bitmap *bitmap) if (obj < bitmap->max) { set_bit(obj, bitmap->table); + bitmap->last = (obj + 1) & (bitmap->max - 1); obj |= bitmap->top; - bitmap->last = obj + 1; } else obj = -1; - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html