Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 30094
b: refs/heads/master
c: bb4a58b
h: refs/heads/master
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Jun 9, 2006
1 parent f3a66db commit 13622b8
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: da6d503aa0a75ec44f17d985a2b500077e7f6a74
refs/heads/master: bb4a58bf46473e3e83d84054bbc110db3a0f85e4
22 changes: 15 additions & 7 deletions trunk/fs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -800,17 +800,13 @@ struct super_block *get_sb_single(struct file_system_type *fs_type,
EXPORT_SYMBOL(get_sb_single);

struct vfsmount *
do_kern_mount(const char *fstype, int flags, const char *name, void *data)
vfs_kern_mount(struct file_system_type *type, int flags, const char *name, void *data)
{
struct file_system_type *type = get_fs_type(fstype);
struct super_block *sb = ERR_PTR(-ENOMEM);
struct vfsmount *mnt;
int error;
char *secdata = NULL;

if (!type)
return ERR_PTR(-ENODEV);

mnt = alloc_vfsmnt(name);
if (!mnt)
goto out;
Expand Down Expand Up @@ -841,7 +837,6 @@ do_kern_mount(const char *fstype, int flags, const char *name, void *data)
mnt->mnt_parent = mnt;
up_write(&sb->s_umount);
free_secdata(secdata);
put_filesystem(type);
return mnt;
out_sb:
up_write(&sb->s_umount);
Expand All @@ -852,10 +847,23 @@ do_kern_mount(const char *fstype, int flags, const char *name, void *data)
out_mnt:
free_vfsmnt(mnt);
out:
put_filesystem(type);
return (struct vfsmount *)sb;
}

EXPORT_SYMBOL_GPL(vfs_kern_mount);

struct vfsmount *
do_kern_mount(const char *fstype, int flags, const char *name, void *data)
{
struct file_system_type *type = get_fs_type(fstype);
struct vfsmount *mnt;
if (!type)
return ERR_PTR(-ENODEV);
mnt = vfs_kern_mount(type, flags, name, data);
put_filesystem(type);
return mnt;
}

EXPORT_SYMBOL_GPL(do_kern_mount);

struct vfsmount *kern_mount(struct file_system_type *type)
Expand Down
5 changes: 5 additions & 0 deletions trunk/include/linux/mount.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ extern struct vfsmount *alloc_vfsmnt(const char *name);
extern struct vfsmount *do_kern_mount(const char *fstype, int flags,
const char *name, void *data);

struct file_system_type;
extern struct vfsmount *vfs_kern_mount(struct file_system_type *type,
int flags, const char *name,
void *data);

struct nameidata;

extern int do_add_mount(struct vfsmount *newmnt, struct nameidata *nd,
Expand Down

0 comments on commit 13622b8

Please sign in to comment.