Skip to content

Commit 868411b

Browse files
committed
FS-Cache: Actually requeue an object when requested
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 <dhowells@redhat.com>
1 parent 60d543c commit 868411b

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎fs/fscache/object.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,13 +353,12 @@ static void fscache_object_slow_work_execute(struct slow_work *work)
353353

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

356-
clear_bit(FSCACHE_OBJECT_EV_REQUEUE, &object->events);
357-
358356
start = jiffies;
359357
fscache_object_state_machine(object);
360358
fscache_hist(fscache_objs_histogram, start);
361359
if (object->events & object->event_mask)
362360
fscache_enqueue_object(object);
361+
clear_bit(FSCACHE_OBJECT_EV_REQUEUE, &object->events);
363362
}
364363

365364
/*

0 commit comments

Comments
 (0)