messaging.c (5dda6992a3138f3839dcaecbcd2fbea4dd514c7c) messaging.c (c8161f64ccdcc3ac05c7bbfebc031e7ad5ca6412)
1/**
2 * eCryptfs: Linux filesystem encryption layer
3 *
4 * Copyright (C) 2004-2006 International Business Machines Corp.
5 * Author(s): Michael A. Halcrow <mhalcrow@us.ibm.com>
6 * Tyler Hicks <tyhicks@ou.edu>
7 *
8 * This program is free software; you can redistribute it and/or

--- 413 unchanged lines hidden (view full) ---

422 ecryptfs_hash_buckets = 1;
423 while (ecryptfs_number_of_users >> ecryptfs_hash_buckets)
424 ecryptfs_hash_buckets++;
425 ecryptfs_daemon_id_hash = kmalloc(sizeof(struct hlist_head)
426 * ecryptfs_hash_buckets, GFP_KERNEL);
427 if (!ecryptfs_daemon_id_hash) {
428 rc = -ENOMEM;
429 ecryptfs_printk(KERN_ERR, "Failed to allocate memory\n");
1/**
2 * eCryptfs: Linux filesystem encryption layer
3 *
4 * Copyright (C) 2004-2006 International Business Machines Corp.
5 * Author(s): Michael A. Halcrow <mhalcrow@us.ibm.com>
6 * Tyler Hicks <tyhicks@ou.edu>
7 *
8 * This program is free software; you can redistribute it and/or

--- 413 unchanged lines hidden (view full) ---

422 ecryptfs_hash_buckets = 1;
423 while (ecryptfs_number_of_users >> ecryptfs_hash_buckets)
424 ecryptfs_hash_buckets++;
425 ecryptfs_daemon_id_hash = kmalloc(sizeof(struct hlist_head)
426 * ecryptfs_hash_buckets, GFP_KERNEL);
427 if (!ecryptfs_daemon_id_hash) {
428 rc = -ENOMEM;
429 ecryptfs_printk(KERN_ERR, "Failed to allocate memory\n");
430 mutex_unlock(&ecryptfs_daemon_id_hash_mux);
430 goto out;
431 }
432 for (i = 0; i < ecryptfs_hash_buckets; i++)
433 INIT_HLIST_HEAD(&ecryptfs_daemon_id_hash[i]);
434 mutex_unlock(&ecryptfs_daemon_id_hash_mux);
435
436 ecryptfs_msg_ctx_arr = kmalloc((sizeof(struct ecryptfs_msg_ctx)
437 * ecryptfs_message_buf_len), GFP_KERNEL);

--- 80 unchanged lines hidden ---
431 goto out;
432 }
433 for (i = 0; i < ecryptfs_hash_buckets; i++)
434 INIT_HLIST_HEAD(&ecryptfs_daemon_id_hash[i]);
435 mutex_unlock(&ecryptfs_daemon_id_hash_mux);
436
437 ecryptfs_msg_ctx_arr = kmalloc((sizeof(struct ecryptfs_msg_ctx)
438 * ecryptfs_message_buf_len), GFP_KERNEL);

--- 80 unchanged lines hidden ---