serial: Remove duplicated macro definition of port type
[linux-2.6-microblaze.git] / fs / namespace.c
index 6d499ab..f30ed40 100644 (file)
@@ -684,9 +684,6 @@ bool __is_local_mountpoint(struct dentry *dentry)
        struct mount *mnt;
        bool is_covered = false;
 
-       if (!d_mountpoint(dentry))
-               goto out;
-
        down_read(&namespace_sem);
        lock_ns_list(ns);
        list_for_each_entry(mnt, &ns->list, mnt_list) {
@@ -698,7 +695,7 @@ bool __is_local_mountpoint(struct dentry *dentry)
        }
        unlock_ns_list(ns);
        up_read(&namespace_sem);
-out:
+
        return is_covered;
 }
 
@@ -1937,6 +1934,9 @@ struct vfsmount *clone_private_mount(const struct path *path)
        if (IS_ERR(new_mnt))
                return ERR_CAST(new_mnt);
 
+       /* Longterm mount to be removed by kern_unmount*() */
+       new_mnt->mnt_ns = MNT_NS_INTERNAL;
+
        return &new_mnt->mnt;
 }
 EXPORT_SYMBOL_GPL(clone_private_mount);
@@ -3863,6 +3863,19 @@ void kern_unmount(struct vfsmount *mnt)
 }
 EXPORT_SYMBOL(kern_unmount);
 
+void kern_unmount_array(struct vfsmount *mnt[], unsigned int num)
+{
+       unsigned int i;
+
+       for (i = 0; i < num; i++)
+               if (mnt[i])
+                       real_mount(mnt[i])->mnt_ns = NULL;
+       synchronize_rcu_expedited();
+       for (i = 0; i < num; i++)
+               mntput(mnt[i]);
+}
+EXPORT_SYMBOL(kern_unmount_array);
+
 bool our_mnt(struct vfsmount *mnt)
 {
        return check_mnt(real_mount(mnt));