]> git.openfabrics.org - ~shefty/libibverbs.git/commit
Undo changes in memory range tree when madvise() fails
authorAlex Vainman <alexonlists@gmail.com>
Sun, 28 Mar 2010 17:06:16 +0000 (20:06 +0300)
committerRoland Dreier <rolandd@cisco.com>
Wed, 21 Apr 2010 22:11:38 +0000 (15:11 -0700)
commit69c9d02748975807593615934f632e48b4e6f70c
treec3636aae150f82daa68b729cd12f6ca98a2fdfdd
parent52a27b09fc6b7384c7dd0d7697ce5fe100d9652c
Undo changes in memory range tree when madvise() fails

ibv_madvise_range() doesn't cleanup if madvise() fails.  This patch
rolls back changes already made in the memory range tracking tree by
madvise() calls before the one that failed.  We can do this fairly
simply by simply restarting ibv_madvise_range() from the original
start to the current location with the opposite advice/inc values.

Signed-off-by: Alex Vainman <alexv@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
src/memory.c