cache: Take cache_ops lock when modifying cache ops flags

Signed-off-by: Thomas Graf <tgraf@suug.ch>
This commit is contained in:
Thomas Graf 2012-12-18 14:56:26 +01:00
parent 96bb7c9a4c
commit de213328f8

View file

@ -235,7 +235,9 @@ void nl_cache_ops_foreach(void (*cb)(struct nl_cache_ops *, void *), void *arg)
*/
void nl_cache_ops_set_flags(struct nl_cache_ops *ops, unsigned int flags)
{
nl_write_lock(&cache_ops_lock);
ops->co_flags |= flags;
nl_write_unlock(&cache_ops_lock);
}
/**