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
@@ -309,7 +309,7 @@ enum {
|
||||
Opt_err
|
||||
};
|
||||
|
||||
static match_table_t tokens = {
|
||||
static const match_table_t tokens = {
|
||||
{Opt_type_old, "ufstype=old"},
|
||||
{Opt_type_sunx86, "ufstype=sunx86"},
|
||||
{Opt_type_sun, "ufstype=sun"},
|
||||
@@ -1233,7 +1233,7 @@ static int ufs_show_options(struct seq_file *seq, struct vfsmount *vfs)
|
||||
{
|
||||
struct ufs_sb_info *sbi = UFS_SB(vfs->mnt_sb);
|
||||
unsigned mval = sbi->s_mount_opt & UFS_MOUNT_UFSTYPE;
|
||||
struct match_token *tp = tokens;
|
||||
const struct match_token *tp = tokens;
|
||||
|
||||
while (tp->token != Opt_onerror_panic && tp->token != mval)
|
||||
++tp;
|
||||
|
Reference in New Issue
Block a user