Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-13090 utils: fix lfs_migrate -p for file with pool
[fs/lustre-release.git]
/
libcfs
/
libcfs
/
libcfs_lock.c
diff --git
a/libcfs/libcfs/libcfs_lock.c
b/libcfs/libcfs/libcfs_lock.c
index
dae4287
..
c6ba9e7
100644
(file)
--- a/
libcfs/libcfs/libcfs_lock.c
+++ b/
libcfs/libcfs/libcfs_lock.c
@@
-21,7
+21,7
@@
* GPL HEADER END
*/
/* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
* GPL HEADER END
*/
/* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012, Intel Corporation.
+ * Copyright (c) 2012,
2015,
Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
*/
/*
* This file is part of Lustre, http://www.lustre.org/
@@
-54,7
+54,8
@@
EXPORT_SYMBOL(cfs_percpt_lock_free);
* reason we always allocate cacheline-aligned memory block.
*/
struct cfs_percpt_lock *
* reason we always allocate cacheline-aligned memory block.
*/
struct cfs_percpt_lock *
-cfs_percpt_lock_alloc(struct cfs_cpt_table *cptab)
+cfs_percpt_lock_create(struct cfs_cpt_table *cptab,
+ struct lock_class_key *keys)
{
struct cfs_percpt_lock *pcl;
spinlock_t *lock;
{
struct cfs_percpt_lock *pcl;
spinlock_t *lock;
@@
-72,12
+73,20
@@
cfs_percpt_lock_alloc(struct cfs_cpt_table *cptab)
return NULL;
}
return NULL;
}
- cfs_percpt_for_each(lock, i, pcl->pcl_locks)
+ if (keys == NULL) {
+ CWARN("Cannot setup class key for percpt lock, you may see "
+ "recursive locking warnings which are actually fake.\n");
+ }
+
+ cfs_percpt_for_each(lock, i, pcl->pcl_locks) {
spin_lock_init(lock);
spin_lock_init(lock);
+ if (keys != NULL)
+ lockdep_set_class(lock, &keys[i]);
+ }
return pcl;
}
return pcl;
}
-EXPORT_SYMBOL(cfs_percpt_lock_
alloc
);
+EXPORT_SYMBOL(cfs_percpt_lock_
create
);
/**
* lock a CPU partition
/**
* lock a CPU partition