From: NeilBrown Date: Tue, 25 Aug 2009 07:09:51 +0000 (+1000) Subject: segments: don't lose delayed updates. X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=3eb2678816434b9b753f7bbcf51dcc10c6f02cde;p=LaFS.git segments: don't lose delayed updates. We need to keep ss if it has negative updates as well as positive. --- diff --git a/segments.c b/segments.c index d27410e..ca6781e 100644 --- a/segments.c +++ b/segments.c @@ -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))