[PATCH 2/2 v2] fs/namespace.c: coding-style update

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fix coding style to use documented multi-line comment style
and EXPORT_SYMBOL()s to immediately follow their function's
closing brace line.

Also fix a little punctuation and a few typos.

Signed-off-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
Cc: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
Cc: linux-fsdevel@xxxxxxxxxxxxxxx
---
 fs/namespace.c |   51 +++++++++++++++++++++++++++++------------------
 1 file changed, 32 insertions(+), 19 deletions(-)

diff -- a/fs/namespace.c b/fs/namespace.c
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -1189,8 +1189,9 @@ struct vfsmount *
 vfs_submount(const struct dentry *mountpoint, struct file_system_type *type,
 	     const char *name, void *data)
 {
-	/* Until it is worked out how to pass the user namespace
-	 * through from the parent mount to the submount don't support
+	/*
+	 * Until it is worked out how to pass the user namespace
+	 * through from the parent mount to the submount, don't support
 	 * unprivileged mounts with submounts.
 	 */
 	if (mountpoint->d_sb->s_user_ns != &init_user_ns)
@@ -1253,8 +1254,10 @@ static struct mount *clone_mnt(struct mo
 	if (flag & CL_MAKE_SHARED)
 		set_mnt_shared(mnt);
 
-	/* stick the duplicate mount on the same expiry list
-	 * as the original if that was on one */
+	/*
+	 * stick the duplicate mount on the same expiry list
+	 * as the original if that was on one
+	 */
 	if (flag & CL_EXPIRE) {
 		if (!list_empty(&old->mnt_expire))
 			list_add(&mnt->mnt_expire, &old->mnt_expire);
@@ -1552,7 +1555,6 @@ int may_umount_tree(struct vfsmount *m)
 
 	return 1;
 }
-
 EXPORT_SYMBOL(may_umount_tree);
 
 /**
@@ -1579,7 +1581,6 @@ int may_umount(struct vfsmount *mnt)
 	up_read(&namespace_sem);
 	return ret;
 }
-
 EXPORT_SYMBOL(may_umount);
 
 static void namespace_unlock(void)
@@ -1628,7 +1629,8 @@ static bool disconnect_mount(struct moun
 	if (!mnt_has_parent(mnt))
 		return true;
 
-	/* Because the reference counting rules change when mounts are
+	/*
+	 * Because the reference counting rules change when mounts are
 	 * unmounted and connected, umounted mounts may not be
 	 * connected to mounted mounts.
 	 */
@@ -1966,7 +1968,8 @@ struct ns_common *from_mnt_ns(struct mnt
 
 static bool mnt_ns_loop(struct dentry *dentry)
 {
-	/* Could bind mounting the mount namespace inode cause a
+	/*
+	 * Could bind mounting the mount namespace inode cause a
 	 * mount namespace loop?
 	 */
 	struct mnt_namespace *mnt_ns;
@@ -2314,7 +2317,8 @@ static int attach_recursive_mnt(struct m
 	struct hlist_node *n;
 	int err;
 
-	/* Preallocate a mountpoint in case the new mounts need
+	/*
+	 * Preallocate a mountpoint in case the new mounts need
 	 * to be tucked under other mounts.
 	 */
 	smp = get_mountpoint(source_mnt->mnt.mnt_root);
@@ -2991,8 +2995,10 @@ static int do_move_mount(struct path *ol
 	if (err)
 		goto out;
 
-	/* if the mount is moved, it should no longer be expire
-	 * automatically */
+	/*
+	 * if the mount is moved, it should no longer be expired
+	 * automatically
+	 */
 	list_del_init(&old->mnt_expire);
 	if (attached)
 		put_mountpoint(old_mp);
@@ -3164,8 +3170,9 @@ int finish_automount(struct vfsmount *m,
 		return PTR_ERR(m);
 
 	mnt = real_mount(m);
-	/* The new mount record should have at least 2 refs to prevent it being
-	 * expired before we get a chance to add it
+	/*
+	 * The new mount record should have at least 2 refs to prevent it being
+	 * expired before we get a chance to add it.
 	 */
 	BUG_ON(mnt_get_count(mnt) < 2);
 
@@ -3252,7 +3259,8 @@ void mark_mounts_for_expiry(struct list_
 	namespace_lock();
 	lock_mount_hash();
 
-	/* extract from the expiration list every vfsmount that matches the
+	/*
+	 * extract from the expiration list every vfsmount that matches the
 	 * following criteria:
 	 * - only referenced by its parent vfsmount
 	 * - still marked for expiry (marked on the last call here; marks are
@@ -3815,7 +3823,8 @@ SYSCALL_DEFINE3(fsmount, int, fs_fd, uns
 	newmount.dentry = dget(fc->root);
 	newmount.mnt->mnt_flags = mnt_flags;
 
-	/* We've done the mount bit - now move the file context into more or
+	/*
+	 * We've done the mount bit - now move the file context into more or
 	 * less the same state as if we'd done an fspick().  We don't want to
 	 * do any memory allocation or anything like that at this point as we
 	 * don't want to have to handle any errors incurred.
@@ -3834,7 +3843,8 @@ SYSCALL_DEFINE3(fsmount, int, fs_fd, uns
 	list_add(&mnt->mnt_list, &ns->list);
 	mntget(newmount.mnt);
 
-	/* Attach to an apparent O_PATH fd with a note that we need to unmount
+	/*
+	 * Attach to an apparent O_PATH fd with a note that we need to unmount
 	 * it, not just simply put it.
 	 */
 	file = dentry_open(&newmount, O_PATH, fc->cred);
@@ -3883,7 +3893,8 @@ SYSCALL_DEFINE5(move_mount,
 	if (flags & ~MOVE_MOUNT__MASK)
 		return -EINVAL;
 
-	/* If someone gives a pathname, they aren't permitted to move
+	/*
+	 * If someone gives a pathname, they aren't permitted to move
 	 * from an fd that requires unmount as we can't get at the flag
 	 * to clear it afterwards.
 	 */
@@ -4643,7 +4654,8 @@ static bool mnt_already_visible(struct m
 		if (mnt->mnt.mnt_sb->s_type != sb->s_type)
 			continue;
 
-		/* This mount is not fully visible if it's root directory
+		/*
+		 * This mount is not fully visible if it's root directory
 		 * is not the root directory of the filesystem.
 		 */
 		if (mnt->mnt.mnt_root != mnt->mnt.mnt_sb->s_root)
@@ -4666,7 +4678,8 @@ static bool mnt_already_visible(struct m
 		    ((mnt_flags & MNT_ATIME_MASK) != (new_flags & MNT_ATIME_MASK)))
 			continue;
 
-		/* This mount is not fully visible if there are any
+		/*
+		 * This mount is not fully visible if there are any
 		 * locked child mounts that cover anything except for
 		 * empty directories.
 		 */



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux