From dd2a3b7ad98f8482cae481cad89dfed5eee48365 Mon Sep 17 00:00:00 2001 From: Michael Halcrow Date: Mon, 12 Feb 2007 00:53:46 -0800 Subject: [PATCH] eCryptfs: Generalize metadata read/write Generalize the metadata reading and writing mechanisms, with two targets for now: metadata in file header and metadata in the user.ecryptfs xattr of the lower file. [akpm@osdl.org: printk warning fix] [bunk@stusta.de: make some needlessly global code static] Signed-off-by: Michael Halcrow Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/ecryptfs/messaging.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'fs/ecryptfs/messaging.c') diff --git a/fs/ecryptfs/messaging.c b/fs/ecryptfs/messaging.c index e8ba6278ad2c..47d7e7b611f7 100644 --- a/fs/ecryptfs/messaging.c +++ b/fs/ecryptfs/messaging.c @@ -22,16 +22,18 @@ #include "ecryptfs_kernel.h" -LIST_HEAD(ecryptfs_msg_ctx_free_list); -LIST_HEAD(ecryptfs_msg_ctx_alloc_list); -struct mutex ecryptfs_msg_ctx_lists_mux; +static LIST_HEAD(ecryptfs_msg_ctx_free_list); +static LIST_HEAD(ecryptfs_msg_ctx_alloc_list); +static struct mutex ecryptfs_msg_ctx_lists_mux; -struct hlist_head *ecryptfs_daemon_id_hash; -struct mutex ecryptfs_daemon_id_hash_mux; -int ecryptfs_hash_buckets; +static struct hlist_head *ecryptfs_daemon_id_hash; +static struct mutex ecryptfs_daemon_id_hash_mux; +static int ecryptfs_hash_buckets; +#define ecryptfs_uid_hash(uid) \ + hash_long((unsigned long)uid, ecryptfs_hash_buckets) -unsigned int ecryptfs_msg_counter; -struct ecryptfs_msg_ctx *ecryptfs_msg_ctx_arr; +static unsigned int ecryptfs_msg_counter; +static struct ecryptfs_msg_ctx *ecryptfs_msg_ctx_arr; /** * ecryptfs_acquire_free_msg_ctx -- cgit v1.2.3