Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 168827
b: refs/heads/master
c: 6897e3d
h: refs/heads/master
i:
  168825: ad45b18
  168823: 214ca9b
v: v3
  • Loading branch information
David Howells committed Nov 19, 2009
1 parent 2cce470 commit a91fcc4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5753c441889253e4323eee85f791a1d64cf08196
refs/heads/master: 6897e3df8fc37bd4a58bbcdef8306da7fc175584
9 changes: 7 additions & 2 deletions trunk/fs/fscache/object.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@ static void fscache_object_state_machine(struct fscache_object *object)

spin_lock(&object->lock);
object->state = FSCACHE_OBJECT_DYING;
if (test_and_clear_bit(FSCACHE_COOKIE_CREATING,
if (object->cookie &&
test_and_clear_bit(FSCACHE_COOKIE_CREATING,
&object->cookie->flags))
wake_up_bit(&object->cookie->flags,
FSCACHE_COOKIE_CREATING);
Expand Down Expand Up @@ -594,7 +595,8 @@ static void fscache_object_available(struct fscache_object *object)

spin_lock(&object->lock);

if (test_and_clear_bit(FSCACHE_COOKIE_CREATING, &object->cookie->flags))
if (object->cookie &&
test_and_clear_bit(FSCACHE_COOKIE_CREATING, &object->cookie->flags))
wake_up_bit(&object->cookie->flags, FSCACHE_COOKIE_CREATING);

fscache_done_parent_op(object);
Expand Down Expand Up @@ -631,6 +633,9 @@ static void fscache_drop_object(struct fscache_object *object)

_enter("{OBJ%x,%d}", object->debug_id, object->n_children);

ASSERTCMP(object->cookie, ==, NULL);
ASSERT(hlist_unhashed(&object->cookie_link));

spin_lock(&cache->object_list_lock);
list_del_init(&object->cache_link);
spin_unlock(&cache->object_list_lock);
Expand Down

0 comments on commit a91fcc4

Please sign in to comment.