Commit f6c9ac7e authored by Kirill Tkhai's avatar Kirill Tkhai Committed by Pavel Emelyanov

files: Declare structures of fake masters

Fake masters are files, which are not owned by
a process, that is able to open them.
Signed-off-by: 's avatarKirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent 882bacff
......@@ -54,6 +54,8 @@
#define FDESC_HASH_SIZE 64
static struct hlist_head file_desc_hash[FDESC_HASH_SIZE];
/* file_desc's, which fle is not owned by a process, that is able to open them */
static LIST_HEAD(fake_master_head);
static void init_fdesc_hash(void)
{
......@@ -66,6 +68,7 @@ static void init_fdesc_hash(void)
void file_desc_init(struct file_desc *d, u32 id, struct file_desc_ops *ops)
{
INIT_LIST_HEAD(&d->fd_info_head);
INIT_LIST_HEAD(&d->fake_master_list);
INIT_HLIST_NODE(&d->hash);
d->id = id;
......
......@@ -133,6 +133,8 @@ struct file_desc {
struct hlist_node hash; /* Descriptor hashing and lookup */
struct list_head fd_info_head; /* Chain of fdinfo_list_entry-s with same ID and type but different pids */
struct file_desc_ops *ops; /* Associated operations */
struct list_head fake_master_list;/* To chain in the list of file_desc, which don't
have a fle in a task, that having permissions */
};
struct fdtype_ops {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment