Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzi...
[sfrench/cifs-2.6.git] / fs / pnode.c
index 56aacead836284b7577ad9146aed46582c592a5f..05ba692bc540ade3b63c5f5af72e1987556bd9fe 100644 (file)
@@ -59,7 +59,7 @@ static int do_make_slave(struct vfsmount *mnt)
        } else {
                struct list_head *p = &mnt->mnt_slave_list;
                while (!list_empty(p)) {
-                        slave_mnt = list_entry(p->next,
+                        slave_mnt = list_first_entry(p,
                                        struct vfsmount, mnt_slave);
                        list_del_init(&slave_mnt->mnt_slave);
                        slave_mnt->mnt_master = NULL;
@@ -83,6 +83,8 @@ void change_mnt_propagation(struct vfsmount *mnt, int type)
                mnt->mnt_master = NULL;
                if (type == MS_UNBINDABLE)
                        mnt->mnt_flags |= MNT_UNBINDABLE;
+               else
+                       mnt->mnt_flags &= ~MNT_UNBINDABLE;
        }
 }