From 02580d16c8ac0a2471213cacd5c6aeae0ea2908f Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sat, 15 Jan 2011 20:08:44 -0500 Subject: [PATCH] --- yaml --- r: 231527 b: refs/heads/master c: 7b8a53fd815deb39542085897743fa0063f9fe06 h: refs/heads/master i: 231525: 2b8bda96f2f0e26cb9e522e2b6cc998ffd601c72 231523: dafed7a53c70e0602eefc0f8bee9c03e47895ee8 231519: c6c6122fa740f8ad02228ef7b3638444e9f3d22c v: v3 --- [refs] | 2 +- trunk/fs/namespace.c | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 1929c83ab353..6080bfd395d1 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b650c858c26bd9ba29ebc82d30f09355845a294a +refs/heads/master: 7b8a53fd815deb39542085897743fa0063f9fe06 diff --git a/trunk/fs/namespace.c b/trunk/fs/namespace.c index bfcb701f9490..d7fc05fac753 100644 --- a/trunk/fs/namespace.c +++ b/trunk/fs/namespace.c @@ -1226,15 +1226,16 @@ void release_mounts(struct list_head *head) */ void umount_tree(struct vfsmount *mnt, int propagate, struct list_head *kill) { + LIST_HEAD(tmp_list); struct vfsmount *p; for (p = mnt; p; p = next_mnt(p, mnt)) - list_move(&p->mnt_hash, kill); + list_move(&p->mnt_hash, &tmp_list); if (propagate) - propagate_umount(kill); + propagate_umount(&tmp_list); - list_for_each_entry(p, kill, mnt_hash) { + list_for_each_entry(p, &tmp_list, mnt_hash) { list_del_init(&p->mnt_expire); list_del_init(&p->mnt_list); __touch_mnt_namespace(p->mnt_ns); @@ -1246,6 +1247,7 @@ void umount_tree(struct vfsmount *mnt, int propagate, struct list_head *kill) } change_mnt_propagation(p, MS_PRIVATE); } + list_splice(&tmp_list, kill); } static void shrink_submounts(struct vfsmount *mnt, struct list_head *umounts);