]> git.neil.brown.name Git - LaFS.git/commitdiff
segments: don't lose delayed updates.
authorNeilBrown <neilb@suse.de>
Tue, 25 Aug 2009 07:09:51 +0000 (17:09 +1000)
committerNeilBrown <neilb@suse.de>
Tue, 25 Aug 2009 07:09:51 +0000 (17:09 +1000)
We need to keep ss if it has negative updates as well as
positive.

segments.c

index d27410efa67e0f8782d001e8d77c5908839eedab..ca6781e8623457298b1bb3e9390f9c1024400e8e 100644 (file)
@@ -106,7 +106,7 @@ static inline void ss_get(struct segsum *ss)
 static void ss_put(struct segsum *ss, struct fs *fs)
 {
        if (atomic_dec_and_lock(&ss->refcnt, &fs->stable_lock)) {
-               if (atomic_read(&ss->delayed) > 0)
+               if (atomic_read(&ss->delayed) != 0)
                        spin_unlock(&fs->stable_lock);
                else {
                        if (!hlist_unhashed(&ss->hash))