]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - fs/ecryptfs/messaging.c
Merge branch 'sg' of git://git.kernel.dk/linux-2.6-block
[mv-sheeva.git] / fs / ecryptfs / messaging.c
index a9d87c47f72dfda1c047d736f68512e7cff028ba..a96d341d154d0d0082047ca291632bd4002a7ac9 100644 (file)
@@ -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) {