X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=fs%2Fjbd%2Fcommit.c;h=ecb44c94ba8de4251de699bd6e35a317ecee8a85;hb=7da23b86e14b77c094b11a9fa5ef5b3758fc9193;hp=4bd882548c456bc496c9facab237e12445efaed1;hpb=2b876f95d03e226394b5d360c86127cbefaf614b;p=karo-tx-linux.git diff --git a/fs/jbd/commit.c b/fs/jbd/commit.c index 4bd882548c45..ecb44c94ba8d 100644 --- a/fs/jbd/commit.c +++ b/fs/jbd/commit.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include @@ -862,12 +861,12 @@ restart_loop: /* A buffer which has been freed while still being * journaled by a previous transaction may end up still * being dirty here, but we want to avoid writing back - * that buffer in the future now that the last use has - * been committed. That's not only a performance gain, - * it also stops aliasing problems if the buffer is left - * behind for writeback and gets reallocated for another + * that buffer in the future after the "add to orphan" + * operation been committed, That's not only a performance + * gain, it also stops aliasing problems if the buffer is + * left behind for writeback and gets reallocated for another * use in a different page. */ - if (buffer_freed(bh)) { + if (buffer_freed(bh) && !jh->b_next_transaction) { clear_buffer_freed(bh); clear_buffer_jbddirty(bh); }