]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
FS-Cache: Out of line fscache_operation_init()
authorDavid Howells <dhowells@redhat.com>
Wed, 25 Feb 2015 13:26:39 +0000 (13:26 +0000)
committerDavid Howells <dhowells@redhat.com>
Thu, 2 Apr 2015 13:28:53 +0000 (14:28 +0100)
Out of line fscache_operation_init() so that it can access internal FS-Cache
features, such as stats, in a later commit.

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

index 67594a8d791a50ca74c380a4fe59dee13296dd04..61a6e78b85fa7ac77cc0114c3caa8d4beb8049af 100644 (file)
 atomic_t fscache_op_debug_id;
 EXPORT_SYMBOL(fscache_op_debug_id);
 
+/**
+ * fscache_operation_init - Do basic initialisation of an operation
+ * @op: The operation to initialise
+ * @release: The release function to assign
+ *
+ * Do basic initialisation of an operation.  The caller must still set flags,
+ * object and processor if needed.
+ */
+void fscache_operation_init(struct fscache_operation *op,
+                           fscache_operation_processor_t processor,
+                           fscache_operation_release_t release)
+{
+       INIT_WORK(&op->work, fscache_op_work_func);
+       atomic_set(&op->usage, 1);
+       op->state = FSCACHE_OP_ST_INITIALISED;
+       op->debug_id = atomic_inc_return(&fscache_op_debug_id);
+       op->processor = processor;
+       op->release = release;
+       INIT_LIST_HEAD(&op->pend_link);
+}
+EXPORT_SYMBOL(fscache_operation_init);
+
 /**
  * fscache_enqueue_operation - Enqueue an operation for processing
  * @op: The operation to enqueue
index ca3d550da11eab11dba469fe06d1bcaf1c9f3f1e..0e26d49972e3369ee707bf80b0656393fde681d7 100644 (file)
@@ -119,27 +119,9 @@ extern void fscache_op_work_func(struct work_struct *work);
 extern void fscache_enqueue_operation(struct fscache_operation *);
 extern void fscache_op_complete(struct fscache_operation *, bool);
 extern void fscache_put_operation(struct fscache_operation *);
-
-/**
- * fscache_operation_init - Do basic initialisation of an operation
- * @op: The operation to initialise
- * @release: The release function to assign
- *
- * Do basic initialisation of an operation.  The caller must still set flags,
- * object and processor if needed.
- */
-static inline void fscache_operation_init(struct fscache_operation *op,
-                                       fscache_operation_processor_t processor,
-                                       fscache_operation_release_t release)
-{
-       INIT_WORK(&op->work, fscache_op_work_func);
-       atomic_set(&op->usage, 1);
-       op->state = FSCACHE_OP_ST_INITIALISED;
-       op->debug_id = atomic_inc_return(&fscache_op_debug_id);
-       op->processor = processor;
-       op->release = release;
-       INIT_LIST_HEAD(&op->pend_link);
-}
+extern void fscache_operation_init(struct fscache_operation *,
+                                  fscache_operation_processor_t,
+                                  fscache_operation_release_t);
 
 /*
  * data read operation