From 1773e7fa2cd9432a4bd4e01b8a2d3f86ae244380 Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Tue, 31 May 2011 14:26:07 +0300 Subject: [PATCH] --- yaml --- r: 253007 b: refs/heads/master c: 837072377034d0a0b18b851d1ab95676b245cc0a h: refs/heads/master i: 253005: 3eac1ca7945f2b42a4ffad17d65b661ba806b907 253003: 0dda7e75056bd274af5e83f57aa67c823dcab3f0 252999: 763e0c7b3be0106567448a635c1eabbee6ad3053 252991: 11454bae63a4bfe56f7e153665346ad34c0a779a v: v3 --- [refs] | 2 +- trunk/fs/ubifs/tnc.c | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index f30b676beac2..30835ab04dcc 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 812eb258311f89bcd664a34a620f249d54a2cd83 +refs/heads/master: 837072377034d0a0b18b851d1ab95676b245cc0a diff --git a/trunk/fs/ubifs/tnc.c b/trunk/fs/ubifs/tnc.c index 8119b1fd8d94..91b4213dde84 100644 --- a/trunk/fs/ubifs/tnc.c +++ b/trunk/fs/ubifs/tnc.c @@ -2876,12 +2876,13 @@ static void tnc_destroy_cnext(struct ubifs_info *c) */ void ubifs_tnc_close(struct ubifs_info *c) { - long clean_freed; - tnc_destroy_cnext(c); if (c->zroot.znode) { - clean_freed = ubifs_destroy_tnc_subtree(c->zroot.znode); - atomic_long_sub(clean_freed, &ubifs_clean_zn_cnt); + long n; + + ubifs_destroy_tnc_subtree(c->zroot.znode); + n = atomic_long_read(&c->clean_zn_cnt); + atomic_long_sub(n, &ubifs_clean_zn_cnt); } kfree(c->gap_lebs); kfree(c->ilebs);