projects
/
linux-2.6-microblaze.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[linux-2.6-microblaze.git]
/
fs
/
namespace.c
diff --git
a/fs/namespace.c
b/fs/namespace.c
index
2b681f6
..
d2db7df
100644
(file)
--- a/
fs/namespace.c
+++ b/
fs/namespace.c
@@
-156,10
+156,10
@@
static inline void mnt_add_count(struct mount *mnt, int n)
/*
* vfsmount lock must be held for write
*/
/*
* vfsmount lock must be held for write
*/
-
unsigned
int mnt_get_count(struct mount *mnt)
+int mnt_get_count(struct mount *mnt)
{
#ifdef CONFIG_SMP
{
#ifdef CONFIG_SMP
-
unsigned
int count = 0;
+ int count = 0;
int cpu;
for_each_possible_cpu(cpu) {
int cpu;
for_each_possible_cpu(cpu) {
@@
-1139,6
+1139,7
@@
static DECLARE_DELAYED_WORK(delayed_mntput_work, delayed_mntput);
static void mntput_no_expire(struct mount *mnt)
{
LIST_HEAD(list);
static void mntput_no_expire(struct mount *mnt)
{
LIST_HEAD(list);
+ int count;
rcu_read_lock();
if (likely(READ_ONCE(mnt->mnt_ns))) {
rcu_read_lock();
if (likely(READ_ONCE(mnt->mnt_ns))) {
@@
-1162,7
+1163,9
@@
static void mntput_no_expire(struct mount *mnt)
*/
smp_mb();
mnt_add_count(mnt, -1);
*/
smp_mb();
mnt_add_count(mnt, -1);
- if (mnt_get_count(mnt)) {
+ count = mnt_get_count(mnt);
+ if (count != 0) {
+ WARN_ON(count < 0);
rcu_read_unlock();
unlock_mount_hash();
return;
rcu_read_unlock();
unlock_mount_hash();
return;