Commit b58fed8b authored by Ram Pai's avatar Ram Pai Committed by Linus Torvalds
Browse files

[PATCH] lindent fs/namespace.c



Signed-off-by: default avatarRam Pai <linuxram@us.ibm.com>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 5addc5dd
Loading
Loading
Loading
Loading
+48 −49
Original line number Diff line number Diff line
@@ -165,8 +165,7 @@ static struct vfsmount *next_mnt(struct vfsmount *p, struct vfsmount *root)
	return list_entry(next, struct vfsmount, mnt_child);
}

static struct vfsmount *
clone_mnt(struct vfsmount *old, struct dentry *root)
static struct vfsmount *clone_mnt(struct vfsmount *old, struct dentry *root)
{
	struct super_block *sb = old->mnt_sb;
	struct vfsmount *mnt = alloc_vfsmnt(old->mnt_devname);
@@ -344,7 +343,8 @@ repeat:
	next = this_parent->mnt_mounts.next;
resume:
	while (next != &this_parent->mnt_mounts) {
		struct vfsmount *p = list_entry(next, struct vfsmount, mnt_child);
		struct vfsmount *p =
		    list_entry(next, struct vfsmount, mnt_child);

		next = next->next;

@@ -545,7 +545,6 @@ out:
/*
 *	The 2.0 compatible umount. No flags.
 */
 
asmlinkage long sys_oldumount(char __user * name)
{
	return sys_umount(name, 0);
@@ -571,8 +570,7 @@ static int mount_is_safe(struct nameidata *nd)
#endif
}

static int
lives_below_in_same_fs(struct dentry *d, struct dentry *dentry)
static int lives_below_in_same_fs(struct dentry *d, struct dentry *dentry)
{
	while (1) {
		if (d == dentry)
@@ -718,7 +716,6 @@ out:
 * If you've mounted a non-root directory somewhere and want to do remount
 * on it - tough luck.
 */

static int do_remount(struct nameidata *nd, int flags, int mnt_flags,
		      void *data)
{
@@ -986,8 +983,8 @@ EXPORT_SYMBOL_GPL(mark_mounts_for_expiry);
 * Note that this function differs from copy_from_user() in that it will oops
 * on bad values of `to', rather than returning a short copy.
 */
static long
exact_copy_from_user(void *to, const void __user *from, unsigned long n)
static long exact_copy_from_user(void *to, const void __user * from,
				 unsigned long n)
{
	char *t = to;
	const char __user *f = from;
@@ -1295,9 +1292,11 @@ static void chroot_fs_refs(struct nameidata *old_nd, struct nameidata *new_nd)
		if (fs) {
			atomic_inc(&fs->count);
			task_unlock(p);
			if (fs->root==old_nd->dentry&&fs->rootmnt==old_nd->mnt)
			if (fs->root == old_nd->dentry
			    && fs->rootmnt == old_nd->mnt)
				set_fs_root(fs, new_nd->mnt, new_nd->dentry);
			if (fs->pwd==old_nd->dentry&&fs->pwdmnt==old_nd->mnt)
			if (fs->pwd == old_nd->dentry
			    && fs->pwdmnt == old_nd->mnt)
				set_fs_pwd(fs, new_nd->mnt, new_nd->dentry);
			put_fs_struct(fs);
		} else
@@ -1327,8 +1326,8 @@ static void chroot_fs_refs(struct nameidata *old_nd, struct nameidata *new_nd)
 *    though, so you may need to say mount --bind /nfs/my_root /nfs/my_root
 *    first.
 */

asmlinkage long sys_pivot_root(const char __user *new_root, const char __user *put_old)
asmlinkage long sys_pivot_root(const char __user * new_root,
			       const char __user * put_old)
{
	struct vfsmount *tmp;
	struct nameidata new_nd, old_nd, parent_nd, root_parent, user_nd;
@@ -1339,7 +1338,8 @@ asmlinkage long sys_pivot_root(const char __user *new_root, const char __user *p

	lock_kernel();

	error = __user_walk(new_root, LOOKUP_FOLLOW|LOOKUP_DIRECTORY, &new_nd);
	error = __user_walk(new_root, LOOKUP_FOLLOW | LOOKUP_DIRECTORY,
			    &new_nd);
	if (error)
		goto out0;
	error = -EINVAL;
@@ -1466,8 +1466,7 @@ void __init mnt_init(unsigned long mempages)
	mnt_cache = kmem_cache_create("mnt_cache", sizeof(struct vfsmount),
			0, SLAB_HWCACHE_ALIGN | SLAB_PANIC, NULL, NULL);

	mount_hashtable = (struct list_head *)
		__get_free_page(GFP_ATOMIC);
	mount_hashtable = (struct list_head *)__get_free_page(GFP_ATOMIC);

	if (!mount_hashtable)
		panic("Failed to allocate mount hash table\n");