]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
FS-Cache: When submitting an op, cancel it if the target object is dying
authorDavid Howells <dhowells@redhat.com>
Tue, 24 Feb 2015 10:05:27 +0000 (10:05 +0000)
committerDavid Howells <dhowells@redhat.com>
Thu, 2 Apr 2015 13:28:53 +0000 (14:28 +0100)
commit30ceec6284129662efc3a1e7675b2bd857a046fe
tree98fba830445abbf24eb3fc969564fc20e29c04a8
parent3c3059841a9b99fa8dd8d878607deceec1e363e9
FS-Cache: When submitting an op, cancel it if the target object is dying

When submitting an operation, prefer to cancel the operation immediately
rather than queuing it for later processing if the object is marked as dying
(ie. the object state machine has reached the KILL_OBJECT state).

Whilst we're at it, change the series of related test_bit() calls into a
READ_ONCE() and bitwise-AND operators to reduce the number of load
instructions (test_bit() has a volatile address).

Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Steve Dickson <steved@redhat.com>
Acked-by: Jeff Layton <jeff.layton@primarydata.com>
fs/fscache/operation.c
include/linux/fscache-cache.h