mirror of
https://github.com/Dasharo/linux.git
synced 2026-03-06 15:25:10 -08:00
vfs: Use const for kernel parser table
This is a much better version of a previous patch to make the parser tables constant. Rather than changing the typedef, we put the "const" in all the various places where its required, allowing the __initconst exception for nfsroot which was the cause of the previous trouble. This was posted for review some time ago and I believe its been in -mm since then. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com> Cc: Alexander Viro <aviro@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
54cebc68c8
commit
a447c09324
@@ -659,7 +659,7 @@ enum {
|
||||
Opt_uid, Opt_gid, Opt_mode, Opt_debug, Opt_err,
|
||||
};
|
||||
|
||||
static match_table_t spufs_tokens = {
|
||||
static const match_table_t spufs_tokens = {
|
||||
{ Opt_uid, "uid=%d" },
|
||||
{ Opt_gid, "gid=%d" },
|
||||
{ Opt_mode, "mode=%o" },
|
||||
|
||||
@@ -219,7 +219,7 @@ static int hypfs_release(struct inode *inode, struct file *filp)
|
||||
|
||||
enum { opt_uid, opt_gid, opt_err };
|
||||
|
||||
static match_table_t hypfs_tokens = {
|
||||
static const match_table_t hypfs_tokens = {
|
||||
{opt_uid, "uid=%u"},
|
||||
{opt_gid, "gid=%u"},
|
||||
{opt_err, NULL}
|
||||
|
||||
@@ -1683,7 +1683,7 @@ enum {
|
||||
SRP_OPT_SERVICE_ID),
|
||||
};
|
||||
|
||||
static match_table_t srp_opt_tokens = {
|
||||
static const match_table_t srp_opt_tokens = {
|
||||
{ SRP_OPT_ID_EXT, "id_ext=%s" },
|
||||
{ SRP_OPT_IOC_GUID, "ioc_guid=%s" },
|
||||
{ SRP_OPT_DGID, "dgid=%s" },
|
||||
|
||||
@@ -97,7 +97,7 @@ enum {
|
||||
Opt_err,
|
||||
};
|
||||
|
||||
static match_table_t tokens = {
|
||||
static const match_table_t tokens = {
|
||||
{Opt_devuid, "devuid=%u"},
|
||||
{Opt_devgid, "devgid=%u"},
|
||||
{Opt_devmode, "devmode=%o"},
|
||||
|
||||
@@ -55,7 +55,7 @@ enum {
|
||||
Opt_err
|
||||
};
|
||||
|
||||
static match_table_t tokens = {
|
||||
static const match_table_t tokens = {
|
||||
{Opt_debug, "debug=%x"},
|
||||
{Opt_dfltuid, "dfltuid=%u"},
|
||||
{Opt_dfltgid, "dfltgid=%u"},
|
||||
|
||||
@@ -157,7 +157,7 @@ static int adfs_show_options(struct seq_file *seq, struct vfsmount *mnt)
|
||||
|
||||
enum {Opt_uid, Opt_gid, Opt_ownmask, Opt_othmask, Opt_err};
|
||||
|
||||
static match_table_t tokens = {
|
||||
static const match_table_t tokens = {
|
||||
{Opt_uid, "uid=%u"},
|
||||
{Opt_gid, "gid=%u"},
|
||||
{Opt_ownmask, "ownmask=%o"},
|
||||
|
||||
@@ -135,7 +135,7 @@ enum {
|
||||
Opt_verbose, Opt_volume, Opt_ignore, Opt_err,
|
||||
};
|
||||
|
||||
static match_table_t tokens = {
|
||||
static const match_table_t tokens = {
|
||||
{Opt_bs, "bs=%u"},
|
||||
{Opt_mode, "mode=%o"},
|
||||
{Opt_mufs, "mufs"},
|
||||
|
||||
@@ -64,7 +64,7 @@ enum {
|
||||
afs_opt_vol,
|
||||
};
|
||||
|
||||
static match_table_t afs_options_list = {
|
||||
static const match_table_t afs_options_list = {
|
||||
{ afs_opt_cell, "cell=%s" },
|
||||
{ afs_opt_rwpath, "rwpath" },
|
||||
{ afs_opt_vol, "vol=%s" },
|
||||
|
||||
@@ -59,7 +59,7 @@ static const struct super_operations autofs_sops = {
|
||||
|
||||
enum {Opt_err, Opt_fd, Opt_uid, Opt_gid, Opt_pgrp, Opt_minproto, Opt_maxproto};
|
||||
|
||||
static match_table_t autofs_tokens = {
|
||||
static const match_table_t autofs_tokens = {
|
||||
{Opt_fd, "fd=%u"},
|
||||
{Opt_uid, "uid=%u"},
|
||||
{Opt_gid, "gid=%u"},
|
||||
|
||||
@@ -213,7 +213,7 @@ static const struct super_operations autofs4_sops = {
|
||||
enum {Opt_err, Opt_fd, Opt_uid, Opt_gid, Opt_pgrp, Opt_minproto, Opt_maxproto,
|
||||
Opt_indirect, Opt_direct, Opt_offset};
|
||||
|
||||
static match_table_t tokens = {
|
||||
static const match_table_t tokens = {
|
||||
{Opt_fd, "fd=%u"},
|
||||
{Opt_uid, "uid=%u"},
|
||||
{Opt_gid, "gid=%u"},
|
||||
|
||||
@@ -650,7 +650,7 @@ enum {
|
||||
Opt_uid, Opt_gid, Opt_charset, Opt_debug, Opt_err,
|
||||
};
|
||||
|
||||
static match_table_t befs_tokens = {
|
||||
static const match_table_t befs_tokens = {
|
||||
{Opt_uid, "uid=%d"},
|
||||
{Opt_gid, "gid=%d"},
|
||||
{Opt_charset, "iocharset=%s"},
|
||||
|
||||
@@ -49,7 +49,7 @@ enum {
|
||||
Opt_err
|
||||
};
|
||||
|
||||
static match_table_t tokens = {
|
||||
static const match_table_t tokens = {
|
||||
{Opt_uid, "uid=%u"},
|
||||
{Opt_gid, "gid=%u"},
|
||||
{Opt_mode, "mode=%o"},
|
||||
|
||||
@@ -211,7 +211,7 @@ enum { ecryptfs_opt_sig, ecryptfs_opt_ecryptfs_sig,
|
||||
ecryptfs_opt_passthrough, ecryptfs_opt_xattr_metadata,
|
||||
ecryptfs_opt_encrypted_view, ecryptfs_opt_err };
|
||||
|
||||
static match_table_t tokens = {
|
||||
static const match_table_t tokens = {
|
||||
{ecryptfs_opt_sig, "sig=%s"},
|
||||
{ecryptfs_opt_ecryptfs_sig, "ecryptfs_sig=%s"},
|
||||
{ecryptfs_opt_cipher, "cipher=%s"},
|
||||
|
||||
@@ -393,7 +393,7 @@ enum {
|
||||
Opt_usrquota, Opt_grpquota, Opt_reservation, Opt_noreservation
|
||||
};
|
||||
|
||||
static match_table_t tokens = {
|
||||
static const match_table_t tokens = {
|
||||
{Opt_bsd_df, "bsddf"},
|
||||
{Opt_minix_df, "minixdf"},
|
||||
{Opt_grpid, "grpid"},
|
||||
|
||||
@@ -760,7 +760,7 @@ enum {
|
||||
Opt_grpquota
|
||||
};
|
||||
|
||||
static match_table_t tokens = {
|
||||
static const match_table_t tokens = {
|
||||
{Opt_bsd_df, "bsddf"},
|
||||
{Opt_minix_df, "minixdf"},
|
||||
{Opt_grpid, "grpid"},
|
||||
|
||||
@@ -919,7 +919,7 @@ enum {
|
||||
Opt_inode_readahead_blks
|
||||
};
|
||||
|
||||
static match_table_t tokens = {
|
||||
static const match_table_t tokens = {
|
||||
{Opt_bsd_df, "bsddf"},
|
||||
{Opt_minix_df, "minixdf"},
|
||||
{Opt_grpid, "grpid"},
|
||||
|
||||
@@ -855,7 +855,7 @@ enum {
|
||||
Opt_obsolate, Opt_flush, Opt_tz_utc, Opt_err,
|
||||
};
|
||||
|
||||
static match_table_t fat_tokens = {
|
||||
static const match_table_t fat_tokens = {
|
||||
{Opt_check_r, "check=relaxed"},
|
||||
{Opt_check_s, "check=strict"},
|
||||
{Opt_check_n, "check=normal"},
|
||||
@@ -890,14 +890,14 @@ static match_table_t fat_tokens = {
|
||||
{Opt_tz_utc, "tz=UTC"},
|
||||
{Opt_err, NULL},
|
||||
};
|
||||
static match_table_t msdos_tokens = {
|
||||
static const match_table_t msdos_tokens = {
|
||||
{Opt_nodots, "nodots"},
|
||||
{Opt_nodots, "dotsOK=no"},
|
||||
{Opt_dots, "dots"},
|
||||
{Opt_dots, "dotsOK=yes"},
|
||||
{Opt_err, NULL}
|
||||
};
|
||||
static match_table_t vfat_tokens = {
|
||||
static const match_table_t vfat_tokens = {
|
||||
{Opt_charset, "iocharset=%s"},
|
||||
{Opt_shortname_lower, "shortname=lower"},
|
||||
{Opt_shortname_win95, "shortname=win95"},
|
||||
|
||||
@@ -354,7 +354,7 @@ enum {
|
||||
OPT_ERR
|
||||
};
|
||||
|
||||
static match_table_t tokens = {
|
||||
static const match_table_t tokens = {
|
||||
{OPT_FD, "fd=%u"},
|
||||
{OPT_ROOTMODE, "rootmode=%o"},
|
||||
{OPT_USER_ID, "user_id=%u"},
|
||||
|
||||
@@ -46,7 +46,7 @@ enum {
|
||||
Opt_err,
|
||||
};
|
||||
|
||||
static match_table_t tokens = {
|
||||
static const match_table_t tokens = {
|
||||
{Opt_lockproto, "lockproto=%s"},
|
||||
{Opt_locktable, "locktable=%s"},
|
||||
{Opt_hostdata, "hostdata=%s"},
|
||||
|
||||
@@ -173,7 +173,7 @@ enum {
|
||||
opt_err
|
||||
};
|
||||
|
||||
static match_table_t tokens = {
|
||||
static const match_table_t tokens = {
|
||||
{ opt_uid, "uid=%u" },
|
||||
{ opt_gid, "gid=%u" },
|
||||
{ opt_umask, "umask=%o" },
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user