diff mbox series

[3/6] afs: Move the source fs parameter to the first position

Message ID 153484531821.1183.17951530333694057258.stgit@warthog.procyon.org.uk (mailing list archive)
State New, archived
Headers show
Series [1/6] vfs: Fix vfs_dup_fs_context() | expand

Commit Message

David Howells Aug. 21, 2018, 9:55 a.m. UTC
Move the source fs parameter to the first position in the parameter list,
numerically speaking.  Note that it isn't moved in the key string table as
that's a sorted list.

Signed-off-by: David Howells <dhowells@redhat.com>
---

 fs/afs/super.c |   20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
diff mbox series

Patch

diff --git a/fs/afs/super.c b/fs/afs/super.c
index 7c97836e7937..15c5eb9412bb 100644
--- a/fs/afs/super.c
+++ b/fs/afs/super.c
@@ -68,16 +68,16 @@  static struct kmem_cache *afs_inode_cachep;
 static atomic_t afs_count_active_inodes;
 
 enum afs_param {
+	Opt_source,
 	Opt_autocell,
 	Opt_dyn,
-	Opt_source,
 	nr__afs_params
 };
 
 static const struct fs_parameter_spec afs_param_specs[nr__afs_params] = {
+	[Opt_source]	= { fs_param_is_string },
 	[Opt_autocell]	= { fs_param_takes_no_value },
 	[Opt_dyn]	= { fs_param_takes_no_value },
-	[Opt_source]	= { fs_param_is_string },
 };
 
 static const struct constant_table afs_param_keys[] = {
@@ -900,14 +900,6 @@  static int afs_get_fsinfo(struct dentry *dentry, struct fsinfo_kparams *params)
 		if (params->Mth)
 			return -ENODATA;
 		switch (params->Nth) {
-		case Opt_autocell:
-			if (as->autocell)
-				str = "autocell";
-			goto string;
-		case Opt_dyn:
-			if (dyn_root)
-				str = "dyn";
-			goto string;
 		case Opt_source:
 			if (dyn_root)
 				return 0;
@@ -918,6 +910,14 @@  static int afs_get_fsinfo(struct dentry *dentry, struct fsinfo_kparams *params)
 				       volume->type == AFSVL_RWVOL ? "" :
 				       volume->type == AFSVL_ROVOL ? ".readonly" :
 				       ".backup");
+		case Opt_autocell:
+			if (as->autocell)
+				str = "autocell";
+			goto string;
+		case Opt_dyn:
+			if (dyn_root)
+				str = "dyn";
+			goto string;
 		default:
 			return -ENODATA;
 		}