]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/cachefiles/namei.c
FS-Cache: Wrap checks on object state
[karo-tx-linux.git] / fs / cachefiles / namei.c
index 07cbd447861ec0d394fa5d7d07b15d76d7baa6c0..01979a3f51214175dea87a35db995e4da925c27a 100644 (file)
@@ -130,7 +130,7 @@ found_dentry:
               fscache_object_states[object->fscache.state],
               dentry);
 
-       if (object->fscache.state < FSCACHE_OBJECT_DYING) {
+       if (fscache_object_is_live(&object->fscache)) {
                printk(KERN_ERR "\n");
                printk(KERN_ERR "CacheFiles: Error:"
                       " Can't preemptively bury live object\n");
@@ -192,7 +192,7 @@ try_again:
        /* an old object from a previous incarnation is hogging the slot - we
         * need to wait for it to be destroyed */
 wait_for_old_object:
-       if (xobject->fscache.state < FSCACHE_OBJECT_DYING) {
+       if (fscache_object_is_live(&object->fscache)) {
                printk(KERN_ERR "\n");
                printk(KERN_ERR "CacheFiles: Error:"
                       " Unexpected object collision\n");