X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Ffile_table.c;h=031f3cb859554de117031d4490c8bf67c5a9b220;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=9d71ae0806a3de083d7554fd4d2cf29b9d2255b4;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/fs/file_table.c b/fs/file_table.c index 9d71ae080..031f3cb85 100644 --- a/fs/file_table.c +++ b/fs/file_table.c @@ -26,12 +26,10 @@ struct files_stat_struct files_stat = { EXPORT_SYMBOL(files_stat); /* Needed by unix.o */ -/* public *and* exported. Not pretty! */ -spinlock_t __cacheline_aligned_in_smp files_lock = SPIN_LOCK_UNLOCKED; +/* public. Not pretty! */ + __cacheline_aligned_in_smp DEFINE_SPINLOCK(files_lock); -EXPORT_SYMBOL(files_lock); - -static spinlock_t filp_count_lock = SPIN_LOCK_UNLOCKED; +static DEFINE_SPINLOCK(filp_count_lock); /* slab constructors and destructors are called from arbitrary * context and must be fully threaded - use a local spinlock @@ -86,12 +84,13 @@ static int old_max; atomic_set(&f->f_count, 1); f->f_uid = current->fsuid; f->f_gid = current->fsgid; - f->f_owner.lock = RW_LOCK_UNLOCKED; + rwlock_init(&f->f_owner.lock); /* f->f_version: 0 */ INIT_LIST_HEAD(&f->f_list); // set_vx_info(&f->f_vx_info, current->vx_info); - f->f_xid = current->xid; + f->f_xid = vx_current_xid(); vx_files_inc(f); + f->f_maxcount = INT_MAX; return f; } } @@ -208,8 +207,6 @@ void put_filp(struct file *file) } } -EXPORT_SYMBOL(put_filp); - void file_move(struct file *file, struct list_head *list) { if (!list)