Skip to content

Commit

Permalink
FS-Cache: Actually requeue an object when requested
Browse files Browse the repository at this point in the history
FS-Cache objects have an FSCACHE_OBJECT_EV_REQUEUE event that can theoretically
be raised to ask the state machine to requeue the object for further processing
before the work function returns to the slow-work facility.

However, fscache_object_work_execute() was clearing that bit before checking
the event mask to see whether the object has any pending events that require it
to be requeued immediately.

Instead, the bit should be cleared after the check and enqueue.

Signed-off-by: David Howells <[email protected]>
  • Loading branch information
dhowells committed Nov 19, 2009
1 parent 60d543c commit 868411b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fs/fscache/object.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,13 +353,12 @@ static void fscache_object_slow_work_execute(struct slow_work *work)

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

clear_bit(FSCACHE_OBJECT_EV_REQUEUE, &object->events);

start = jiffies;
fscache_object_state_machine(object);
fscache_hist(fscache_objs_histogram, start);
if (object->events & object->event_mask)
fscache_enqueue_object(object);
clear_bit(FSCACHE_OBJECT_EV_REQUEUE, &object->events);
}

/*
Expand Down

0 comments on commit 868411b

Please sign in to comment.