X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=fs%2Fecryptfs%2Fmessaging.c;h=a96d341d154d0d0082047ca291632bd4002a7ac9;hb=fc8a327db6c46de783b1a4276d846841b9abc24c;hp=3baf253be95ad5f6e641cedbeb0f9c6a679c04eb;hpb=8a03d9a498eaf02c8a118752050a5154852c13bf;p=linux-2.6-omap-h63xx.git diff --git a/fs/ecryptfs/messaging.c b/fs/ecryptfs/messaging.c index 3baf253be95..a96d341d154 100644 --- a/fs/ecryptfs/messaging.c +++ b/fs/ecryptfs/messaging.c @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * 02111-1307, USA. */ - +#include #include "ecryptfs_kernel.h" static LIST_HEAD(ecryptfs_msg_ctx_free_list); @@ -419,8 +419,9 @@ int ecryptfs_init_messaging(unsigned int transport) } mutex_init(&ecryptfs_daemon_id_hash_mux); mutex_lock(&ecryptfs_daemon_id_hash_mux); - ecryptfs_hash_buckets = 0; - while (ecryptfs_number_of_users >> ++ecryptfs_hash_buckets); + ecryptfs_hash_buckets = 1; + while (ecryptfs_number_of_users >> ecryptfs_hash_buckets) + ecryptfs_hash_buckets++; ecryptfs_daemon_id_hash = kmalloc(sizeof(struct hlist_head) * ecryptfs_hash_buckets, GFP_KERNEL); if (!ecryptfs_daemon_id_hash) {