]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/namespace.c
[PATCH] ext2: cleanup: put_page and comment fix
[linux-2.6-omap-h63xx.git] / fs / namespace.c
index 2c5f1f80bdc28b868cb81aabecdae71bc9c6b480..c13072a5f1ee8bd1a57c9186de12a5a55c553d1b 100644 (file)
@@ -86,6 +86,15 @@ struct vfsmount *alloc_vfsmnt(const char *name)
        return mnt;
 }
 
+int simple_set_mnt(struct vfsmount *mnt, struct super_block *sb)
+{
+       mnt->mnt_sb = sb;
+       mnt->mnt_root = dget(sb->s_root);
+       return 0;
+}
+
+EXPORT_SYMBOL(simple_set_mnt);
+
 void free_vfsmnt(struct vfsmount *mnt)
 {
        kfree(mnt->mnt_devname);
@@ -899,13 +908,11 @@ static int do_change_type(struct nameidata *nd, int flag)
 /*
  * do loopback mount.
  */
-static int do_loopback(struct nameidata *nd, char *old_name, unsigned long flags, int mnt_flags)
+static int do_loopback(struct nameidata *nd, char *old_name, int recurse)
 {
        struct nameidata old_nd;
        struct vfsmount *mnt = NULL;
-       int recurse = flags & MS_REC;
        int err = mount_is_safe(nd);
-
        if (err)
                return err;
        if (!old_name || !*old_name)
@@ -939,7 +946,6 @@ static int do_loopback(struct nameidata *nd, char *old_name, unsigned long flags
                spin_unlock(&vfsmount_lock);
                release_mounts(&umount_list);
        }
-       mnt->mnt_flags = mnt_flags;
 
 out:
        up_write(&namespace_sem);
@@ -1353,7 +1359,7 @@ long do_mount(char *dev_name, char *dir_name, char *type_page,
                retval = do_remount(&nd, flags & ~MS_REMOUNT, mnt_flags,
                                    data_page);
        else if (flags & MS_BIND)
-               retval = do_loopback(&nd, dev_name, flags, mnt_flags);
+               retval = do_loopback(&nd, dev_name, flags & MS_REC);
        else if (flags & (MS_SHARED | MS_PRIVATE | MS_SLAVE | MS_UNBINDABLE))
                retval = do_change_type(&nd, flags);
        else if (flags & MS_MOVE)