lkml.org 
[lkml]   [2018]   [Aug]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 3/6] afs: Move the source fs parameter to the first position
From
Date
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 --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;
}
\
 
 \ /
  Last update: 2018-08-21 11:56    [W:0.043 / U:1.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site