Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 333706
b: refs/heads/master
c: 4b2c551
h: refs/heads/master
v: v3
  • Loading branch information
Lai Jiangshan authored and Al Viro committed Oct 10, 2012
1 parent 2ebedeb commit eb09149
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 466cab878ef98a0618734a1fa64a02e5fbf90867
refs/heads/master: 4b2c551f77f5a0c496e2125b1d883f4b26aabf2c
2 changes: 1 addition & 1 deletion trunk/fs/file_table.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ struct files_stat_struct files_stat = {
.max_files = NR_FILE
};

DEFINE_LGLOCK(files_lglock);
DEFINE_STATIC_LGLOCK(files_lglock);

/* SLAB cache for file structures */
static struct kmem_cache *filp_cachep __read_mostly;
Expand Down
8 changes: 7 additions & 1 deletion trunk/include/linux/lglock.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
#define br_write_lock(name) lg_global_lock(name)
#define br_write_unlock(name) lg_global_unlock(name)

#define DEFINE_BRLOCK(name) DEFINE_LGLOCK(name)
#define DEFINE_BRLOCK(name) DEFINE_LGLOCK(name)
#define DEFINE_STATIC_BRLOCK(name) DEFINE_STATIC_LGLOCK(name)

#ifdef CONFIG_DEBUG_LOCK_ALLOC
#define LOCKDEP_INIT_MAP lockdep_init_map
Expand All @@ -53,6 +54,11 @@ struct lglock {
= __ARCH_SPIN_LOCK_UNLOCKED; \
struct lglock name = { .lock = &name ## _lock }

#define DEFINE_STATIC_LGLOCK(name) \
static DEFINE_PER_CPU(arch_spinlock_t, name ## _lock) \
= __ARCH_SPIN_LOCK_UNLOCKED; \
static struct lglock name = { .lock = &name ## _lock }

void lg_lock_init(struct lglock *lg, char *name);
void lg_local_lock(struct lglock *lg);
void lg_local_unlock(struct lglock *lg);
Expand Down

0 comments on commit eb09149

Please sign in to comment.