Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 25502
b: refs/heads/master
c: f6422f1
h: refs/heads/master
v: v3
  • Loading branch information
Herbert Poetzl authored and Linus Torvalds committed Apr 11, 2006
1 parent edc117b commit ff3f520
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 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: fb5035dbbea8826cdbeb5c43d7605255eb6f0baa
refs/heads/master: f6422f17d3a480f21917a3895e2a46b968f56a08
7 changes: 5 additions & 2 deletions trunk/fs/namespace.c
Original file line number Diff line number Diff line change
Expand Up @@ -899,11 +899,13 @@ static int do_change_type(struct nameidata *nd, int flag)
/*
* do loopback mount.
*/
static int do_loopback(struct nameidata *nd, char *old_name, int recurse)
static int do_loopback(struct nameidata *nd, char *old_name, unsigned long flags, int mnt_flags)
{
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)
Expand Down Expand Up @@ -937,6 +939,7 @@ static int do_loopback(struct nameidata *nd, char *old_name, int recurse)
spin_unlock(&vfsmount_lock);
release_mounts(&umount_list);
}
mnt->mnt_flags = mnt_flags;

out:
up_write(&namespace_sem);
Expand Down Expand Up @@ -1350,7 +1353,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 & MS_REC);
retval = do_loopback(&nd, dev_name, flags, mnt_flags);
else if (flags & (MS_SHARED | MS_PRIVATE | MS_SLAVE | MS_UNBINDABLE))
retval = do_change_type(&nd, flags);
else if (flags & MS_MOVE)
Expand Down

0 comments on commit ff3f520

Please sign in to comment.