Skip to content

Commit

Permalink
const: struct quota_format_ops
Browse files Browse the repository at this point in the history
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
  • Loading branch information
Alexey Dobriyan authored and Jan Kara committed Dec 10, 2009
1 parent 5ced58f commit 1472da5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion fs/ocfs2/quota_local.c
Original file line number Diff line number Diff line change
Expand Up @@ -1325,7 +1325,7 @@ static int ocfs2_local_release_dquot(struct dquot *dquot)
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,
Expand Down
2 changes: 1 addition & 1 deletion fs/quota/quota_v1.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ static int v1_write_file_info(struct super_block *sb, int type)
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,
Expand Down
2 changes: 1 addition & 1 deletion fs/quota/quota_v2.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ static int v2_free_file_info(struct super_block *sb, int type)
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,
Expand Down
4 changes: 2 additions & 2 deletions include/linux/quota.h
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ struct quotactl_ops {

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;
};
Expand Down Expand Up @@ -394,7 +394,7 @@ struct quota_info {
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);
Expand Down

0 comments on commit 1472da5

Please sign in to comment.