Actually, the idea of converting immediate allocations into deferred when discard is enabled was flawed. Deferred deallocations ignore block stage and additional flags, while some immediate deallocations use non-standard stage/flags which do not match what's done by reiser4_post_write_back_hook(). So this patchset first tweaks deallocations a bit (while at it, I've removed redundant and unused flags in some call-sites), so that immediate deallocations for blocks that actually need to be discarded are properly converted into deferred deallocations. Remaining instances of immediate deallocations handle blocks which have been just allocated and not yet written to, so they do not need to be discarded. The second commit actually removes the wrong "conversion". Ivan Shapovalov (2): reiser4: sanitize deallocations throughout the code. reiser4: block_alloc: get rid of discard-related hack in reiser4_dealloc_blocks(). fs/reiser4/block_alloc.c | 3 +-- fs/reiser4/plugin/txmod.c | 18 ++++++------------ fs/reiser4/tree.c | 3 +-- fs/reiser4/wander.c | 5 ++--- 4 files changed, 10 insertions(+), 19 deletions(-) -- 2.0.4 -- To unsubscribe from this list: send the line "unsubscribe reiserfs-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html