kernel/futex.c: make 3 functions static
The following functions can now become static again: - get_futex_key() - get_futex_key_refs() - drop_futex_key_refs() Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
02c3530da6
commit
fad23fc78b
|
@ -149,10 +149,6 @@ union futex_key {
|
||||||
int offset;
|
int offset;
|
||||||
} both;
|
} both;
|
||||||
};
|
};
|
||||||
int get_futex_key(u32 __user *uaddr, struct rw_semaphore *shared,
|
|
||||||
union futex_key *key);
|
|
||||||
void get_futex_key_refs(union futex_key *key);
|
|
||||||
void drop_futex_key_refs(union futex_key *key);
|
|
||||||
|
|
||||||
#ifdef CONFIG_FUTEX
|
#ifdef CONFIG_FUTEX
|
||||||
extern void exit_robust_list(struct task_struct *curr);
|
extern void exit_robust_list(struct task_struct *curr);
|
||||||
|
|
|
@ -181,8 +181,8 @@ static inline int match_futex(union futex_key *key1, union futex_key *key2)
|
||||||
* For other futexes, it points to ¤t->mm->mmap_sem and
|
* For other futexes, it points to ¤t->mm->mmap_sem and
|
||||||
* caller must have taken the reader lock. but NOT any spinlocks.
|
* caller must have taken the reader lock. but NOT any spinlocks.
|
||||||
*/
|
*/
|
||||||
int get_futex_key(u32 __user *uaddr, struct rw_semaphore *fshared,
|
static int get_futex_key(u32 __user *uaddr, struct rw_semaphore *fshared,
|
||||||
union futex_key *key)
|
union futex_key *key)
|
||||||
{
|
{
|
||||||
unsigned long address = (unsigned long)uaddr;
|
unsigned long address = (unsigned long)uaddr;
|
||||||
struct mm_struct *mm = current->mm;
|
struct mm_struct *mm = current->mm;
|
||||||
|
@ -268,14 +268,13 @@ int get_futex_key(u32 __user *uaddr, struct rw_semaphore *fshared,
|
||||||
}
|
}
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(get_futex_key);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Take a reference to the resource addressed by a key.
|
* Take a reference to the resource addressed by a key.
|
||||||
* Can be called while holding spinlocks.
|
* Can be called while holding spinlocks.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
inline void get_futex_key_refs(union futex_key *key)
|
static void get_futex_key_refs(union futex_key *key)
|
||||||
{
|
{
|
||||||
if (key->both.ptr == 0)
|
if (key->both.ptr == 0)
|
||||||
return;
|
return;
|
||||||
|
@ -288,13 +287,12 @@ inline void get_futex_key_refs(union futex_key *key)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(get_futex_key_refs);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Drop a reference to the resource addressed by a key.
|
* Drop a reference to the resource addressed by a key.
|
||||||
* The hash bucket spinlock must not be held.
|
* The hash bucket spinlock must not be held.
|
||||||
*/
|
*/
|
||||||
void drop_futex_key_refs(union futex_key *key)
|
static void drop_futex_key_refs(union futex_key *key)
|
||||||
{
|
{
|
||||||
if (!key->both.ptr)
|
if (!key->both.ptr)
|
||||||
return;
|
return;
|
||||||
|
@ -307,7 +305,6 @@ void drop_futex_key_refs(union futex_key *key)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(drop_futex_key_refs);
|
|
||||||
|
|
||||||
static u32 cmpxchg_futex_value_locked(u32 __user *uaddr, u32 uval, u32 newval)
|
static u32 cmpxchg_futex_value_locked(u32 __user *uaddr, u32 uval, u32 newval)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue