mm: change inlined allocation helpers to account at the call site
[linux-2.6-block.git] / include / crypto / hash.h
index 5d61f576cfc8606c4da44f5c56101cceb554f1b5..e5181cc9b7c5636bba5f6ed294f10b7aacf0961c 100644 (file)
@@ -578,19 +578,20 @@ static inline void ahash_request_set_tfm(struct ahash_request *req,
  *
  * Return: allocated request handle in case of success, or NULL if out of memory
  */
-static inline struct ahash_request *ahash_request_alloc(
+static inline struct ahash_request *ahash_request_alloc_noprof(
        struct crypto_ahash *tfm, gfp_t gfp)
 {
        struct ahash_request *req;
 
-       req = kmalloc(sizeof(struct ahash_request) +
-                     crypto_ahash_reqsize(tfm), gfp);
+       req = kmalloc_noprof(sizeof(struct ahash_request) +
+                            crypto_ahash_reqsize(tfm), gfp);
 
        if (likely(req))
                ahash_request_set_tfm(req, tfm);
 
        return req;
 }
+#define ahash_request_alloc(...)       alloc_hooks(ahash_request_alloc_noprof(__VA_ARGS__))
 
 /**
  * ahash_request_free() - zeroize and free the request data structure