sys/vfs/hammer: Don't fail to downgrade cursor
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Sun, 23 Aug 2015 11:53:50 +0000 (20:53 +0900)
committerTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Sun, 23 Aug 2015 12:46:23 +0000 (21:46 +0900)
commitebc5d79e7f1bbe241fa96ec0fc3b61c1658b7ed5
tree532027903efaf239ab9542a0e456557b1259d1cd
parentd34bdd3119f4fcbc439c45acc6b7bc6346479b32
sys/vfs/hammer: Don't fail to downgrade cursor

7ef2d7b should have placed end: before
hammer_cursor_downgrade(cursor);.

If hammer volume-del starts to reblock because of non-empty
volume, and first reblocks data, but skips reblock for btree
node as the node was not in that volume (data and btree node
stored in different volume which is usually a rare case),
then volume-del returns from hammer_reblock_helper() without
donwgrading upgraded lock.

This could happen only on volume-del, but not hammer reblock
command since hammer reblock command never hits goto end;.
sys/vfs/hammer/hammer_reblock.c