summaryrefslogtreecommitdiff
path: root/fs/pnode.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-12-16 14:23:45 +0400
committerJohannes Berg <johannes.berg@intel.com>2013-12-16 14:23:45 +0400
commitc4de673b775e4db48cd2db6277e0c6714332ca0c (patch)
tree84f9e4728e6ccf257236d2ba063b6e784ec8b65d /fs/pnode.c
parentbafdc614a1f4f8be8cde41b8ab10ac17e67c1837 (diff)
parent55957fb7a0b61d8ab6ff3f04e279b8fc22b738fa (diff)
downloadlinux-c4de673b775e4db48cd2db6277e0c6714332ca0c.tar.xz
Merge remote-tracking branch 'wireless-next/master' into mac80211-next
Diffstat (limited to 'fs/pnode.c')
-rw-r--r--fs/pnode.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/fs/pnode.c b/fs/pnode.c
index 9af0df15256e..c7221bb19801 100644
--- a/fs/pnode.c
+++ b/fs/pnode.c
@@ -264,12 +264,12 @@ int propagate_mnt(struct mount *dest_mnt, struct mountpoint *dest_mp,
prev_src_mnt = child;
}
out:
- br_write_lock(&vfsmount_lock);
+ lock_mount_hash();
while (!list_empty(&tmp_list)) {
child = list_first_entry(&tmp_list, struct mount, mnt_hash);
umount_tree(child, 0);
}
- br_write_unlock(&vfsmount_lock);
+ unlock_mount_hash();
return ret;
}
@@ -278,8 +278,7 @@ out:
*/
static inline int do_refcount_check(struct mount *mnt, int count)
{
- int mycount = mnt_get_count(mnt) - mnt->mnt_ghosts;
- return (mycount > count);
+ return mnt_get_count(mnt) > count;
}
/*
@@ -311,7 +310,7 @@ int propagate_mount_busy(struct mount *mnt, int refcnt)
for (m = propagation_next(parent, parent); m;
m = propagation_next(m, parent)) {
- child = __lookup_mnt(&m->mnt, mnt->mnt_mountpoint, 0);
+ child = __lookup_mnt_last(&m->mnt, mnt->mnt_mountpoint);
if (child && list_empty(&child->mnt_mounts) &&
(ret = do_refcount_check(child, 1)))
break;
@@ -333,8 +332,8 @@ static void __propagate_umount(struct mount *mnt)
for (m = propagation_next(parent, parent); m;
m = propagation_next(m, parent)) {
- struct mount *child = __lookup_mnt(&m->mnt,
- mnt->mnt_mountpoint, 0);
+ struct mount *child = __lookup_mnt_last(&m->mnt,
+ mnt->mnt_mountpoint);
/*
* umount the child only if the child has no
* other children