const: struct quota_format_ops Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz>
diff --git a/fs/ocfs2/quota_local.c b/fs/ocfs2/quota_local.c index 1a2c50a..21f9e71 100644 --- a/fs/ocfs2/quota_local.c +++ b/fs/ocfs2/quota_local.c
@@ -1325,7 +1325,7 @@ return status; } -static struct quota_format_ops ocfs2_format_ops = { +static const struct quota_format_ops ocfs2_format_ops = { .check_quota_file = ocfs2_local_check_quota_file, .read_file_info = ocfs2_local_read_info, .write_file_info = ocfs2_global_write_info,
diff --git a/fs/quota/quota_v1.c b/fs/quota/quota_v1.c index 0edcf42..2ae757e 100644 --- a/fs/quota/quota_v1.c +++ b/fs/quota/quota_v1.c
@@ -204,7 +204,7 @@ return ret; } -static struct quota_format_ops v1_format_ops = { +static const struct quota_format_ops v1_format_ops = { .check_quota_file = v1_check_quota_file, .read_file_info = v1_read_file_info, .write_file_info = v1_write_file_info,
diff --git a/fs/quota/quota_v2.c b/fs/quota/quota_v2.c index a5475fb..01f25ea 100644 --- a/fs/quota/quota_v2.c +++ b/fs/quota/quota_v2.c
@@ -207,7 +207,7 @@ return 0; } -static struct quota_format_ops v2_format_ops = { +static const struct quota_format_ops v2_format_ops = { .check_quota_file = v2_check_quota_file, .read_file_info = v2_read_file_info, .write_file_info = v2_write_file_info,
diff --git a/include/linux/quota.h b/include/linux/quota.h index ce9a9b2..f63c9d6 100644 --- a/include/linux/quota.h +++ b/include/linux/quota.h
@@ -334,7 +334,7 @@ struct quota_format_type { int qf_fmt_id; /* Quota format id */ - struct quota_format_ops *qf_ops; /* Operations of format */ + const struct quota_format_ops *qf_ops; /* Operations of format */ struct module *qf_owner; /* Module implementing quota format */ struct quota_format_type *qf_next; }; @@ -394,7 +394,7 @@ struct rw_semaphore dqptr_sem; /* serialize ops using quota_info struct, pointers from inode to dquots */ struct inode *files[MAXQUOTAS]; /* inodes of quotafiles */ struct mem_dqinfo info[MAXQUOTAS]; /* Information for each quota type */ - struct quota_format_ops *ops[MAXQUOTAS]; /* Operations for each type */ + const struct quota_format_ops *ops[MAXQUOTAS]; /* Operations for each type */ }; int register_quota_format(struct quota_format_type *fmt);