diff options
| author | ngkaho1234 <ngkaho1234@gmail.com> | 2015-11-24 15:09:23 +0000 |
|---|---|---|
| committer | ngkaho1234 <ngkaho1234@gmail.com> | 2015-11-24 15:14:46 +0000 |
| commit | 29d9896af914e4a058de154920ce55eb6371de93 (patch) | |
| tree | 615bc362b38f9a160839de829bc6b0fad7e900f1 | |
| parent | 1fcbe7f294d68c54752ab7a255a62a8dddd0b6a7 (diff) | |
ext4_bcache: clear BC_DIRTY flag when buffer will be dropped.
| -rw-r--r-- | lwext4/ext4_bcache.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lwext4/ext4_bcache.c b/lwext4/ext4_bcache.c index b3800c8..00be898 100644 --- a/lwext4/ext4_bcache.c +++ b/lwext4/ext4_bcache.c @@ -246,8 +246,10 @@ int ext4_bcache_free(struct ext4_bcache *bc, struct ext4_block *b) b->uptodate = true; } /* Someone might want to drop this buffer from bcache. */ - if (!b->uptodate) + if (!b->uptodate) { + ext4_bcache_clear_flag(buf, BC_DIRTY); ext4_bcache_clear_flag(buf, BC_UPTODATE); + } /* We are the last one touching this buffer, do the cleanups. */ if (!buf->refctr) { |
