ocfs2 1.6 - third set
The third set of patches that deal with missing const modifier in various places in the el5 kernel.
PATCH 1/8 ocfs2: Handle non-const seq_operations
Mainline commit 15ad7cdcfd76450d4beebc789ec646664238184d const-ified seq_file->op.
--- Config.make.in | 1 + configure.in | 5 +++++ fs/ocfs2/Makefile | 4 ++++ fs/ocfs2/dlmglue.c | 4 ++++ 4 files changed, 14 insertions(+), 0 deletions(-)
Config.make.in +1 -0
@@ -62,6 +62,7 @@ NO_DLMCONSTANTS_HEADER = @NO_DLMCONSTANTS_HEADER@ NO_F_PATH_IN_STRUCT_FILE = @NO_F_PATH_IN_STRUCT_FILE@ ADDRESS_SPACE_OPS_EXT = @ADDRESS_SPACE_OPS_EXT@ FVERSION_IS_ULONG = @FVERSION_IS_ULONG@ +SEQ_OPS_IS_NOT_CONST = @SEQ_OPS_IS_NOT_CONST@ OCFS_DEBUG = @OCFS_DEBUG@
configure.in +5 -0
@@ -231,6 +231,11 @@ if test "x$FVERSION_IS_ULONG" = "x" ; then fi KAPI_COMPAT_HEADERS="$KAPI_COMPAT_HEADERS fversion.h" +SEQ_OPS_IS_NOT_CONST= +OCFS2_CHECK_KERNEL([const struct seq_operations in seq_file.h], seq_file.h, + , SEQ_OPS_IS_NOT_CONST=yes, [const struct seq_operations \*op;]) +AC_SUBST(SEQ_OPS_IS_NOT_CONST) + # End kapi_compat checks
fs/ocfs2/Makefile +4 -0
@@ -56,6 +56,10 @@ ifdef FVERSION_IS_ULONG EXTRA_CFLAGS += -DFVERSION_IS_ULONG endif +ifdef SEQ_OPS_IS_NOT_CONST +EXTRA_CFLAGS += -DSEQ_OPS_IS_NOT_CONST +endif + # # Since SUBDIRS means something to kbuild, define them safely. Do not # include trailing slashes.
fs/ocfs2/dlmglue.c +4 -0
@@ -2834,7 +2834,11 @@ static int ocfs2_dlm_seq_show(struct seq_file *m, void *v)return 0 ; } +#ifndef SEQ_OPS_IS_NOT_CONST static const struct seq_operations ocfs2_dlm_seq_ops = { +#else +static struct seq_operations ocfs2_dlm_seq_ops = { +#endif .start = ocfs2_dlm_seq_start, .stop = ocfs2_dlm_seq_stop, .next = ocfs2_dlm_seq_next,
Signature · 1 line
1.5.6.5
PATCH 2/8 ocfs2: Handle non-const inode->i_op
In reply to Sunil MushranMainline commit c5ef1c42c51b1b5b4a401a6517bdda30933ddbaf const-ified inode->i_op.
--- Config.make.in | 1 + configure.in | 5 +++++ fs/ocfs2/Makefile | 4 ++++ fs/ocfs2/dlm/Makefile | 4 ++++ fs/ocfs2/dlm/dlmfs.c | 18 ++++++++++++++++++ fs/ocfs2/file.c | 8 ++++++++ fs/ocfs2/file.h | 5 +++++ fs/ocfs2/namei.c | 4 ++++ fs/ocfs2/namei.h | 4 ++++ fs/ocfs2/symlink.c | 9 +++++++++ fs/ocfs2/symlink.h | 5 +++++ 11 files changed, 67 insertions(+), 0 deletions(-)
Config.make.in +1 -0
@@ -63,6 +63,7 @@ NO_F_PATH_IN_STRUCT_FILE = @NO_F_PATH_IN_STRUCT_FILE@ ADDRESS_SPACE_OPS_EXT = @ADDRESS_SPACE_OPS_EXT@ FVERSION_IS_ULONG = @FVERSION_IS_ULONG@ SEQ_OPS_IS_NOT_CONST = @SEQ_OPS_IS_NOT_CONST@ +IOP_IS_NOT_CONST = @IOP_IS_NOT_CONST@ OCFS_DEBUG = @OCFS_DEBUG@
configure.in +5 -0
@@ -236,6 +236,11 @@ OCFS2_CHECK_KERNEL([const struct seq_operations in seq_file.h], seq_file.h, , SEQ_OPS_IS_NOT_CONST=yes, [const struct seq_operations \*op;]) AC_SUBST(SEQ_OPS_IS_NOT_CONST) +IOP_IS_NOT_CONST= +OCFS2_CHECK_KERNEL([inode->i_op has the const modifier in fs.h], fs.h, + , IOP_IS_NOT_CONST=yes, [^.*const struct inode_operations.*\*i_op;]) +AC_SUBST(IOP_IS_NOT_CONST) + # End kapi_compat checks
fs/ocfs2/Makefile +4 -0
@@ -60,6 +60,10 @@ ifdef SEQ_OPS_IS_NOT_CONST EXTRA_CFLAGS += -DSEQ_OPS_IS_NOT_CONST endif +ifdef IOP_IS_NOT_CONST +EXTRA_CFLAGS += -DIOP_IS_NOT_CONST +endif + # # Since SUBDIRS means something to kbuild, define them safely. Do not # include trailing slashes.
fs/ocfs2/dlm/Makefile +4 -0
@@ -30,6 +30,10 @@ ifdef NO_F_PATH_IN_STRUCT_FILE EXTRA_CFLAGS += -DNO_F_PATH_IN_STRUCT_FILE endif +ifdef IOP_IS_NOT_CONST +EXTRA_CFLAGS += -DIOP_IS_NOT_CONST +endif + DLM_SOURCES += \ dlmast.c \ dlmconvert.c \
fs/ocfs2/dlm/dlmfs.c +18 -0
@@ -64,9 +64,15 @@static const struct super_operations dlmfs_ops;static const struct file_operations dlmfs_file_operations; +#ifdef IOP_IS_NOT_CONST +static struct inode_operations dlmfs_dir_inode_operations; +static struct inode_operations dlmfs_root_inode_operations; +static struct inode_operations dlmfs_file_inode_operations; +#else static const struct inode_operations dlmfs_dir_inode_operations;static const struct inode_operations dlmfs_root_inode_operations;static const struct inode_operations dlmfs_file_inode_operations; +#endif static struct kmem_cache *dlmfs_inode_cache;struct workqueue_struct *user_dlm_worker;
@@ -553,14 +559,22 @@ static const struct file_operations dlmfs_file_operations = { .write = dlmfs_file_write, }; +#ifdef IOP_IS_NOT_CONST +static struct inode_operations dlmfs_dir_inode_operations = { +#else static const struct inode_operations dlmfs_dir_inode_operations = { +#endif .create = dlmfs_create, .lookup = simple_lookup, .unlink = dlmfs_unlink, }; /* this way we can restrict mkdir to only the toplevel of the fs. */ +#ifdef IOP_IS_NOT_CONST +static struct inode_operations dlmfs_root_inode_operations = { +#else static const struct inode_operations dlmfs_root_inode_operations = { +#endif .lookup = simple_lookup, .mkdir = dlmfs_mkdir, .rmdir = simple_rmdir,
@@ -574,7 +588,11 @@ static const struct super_operations dlmfs_ops = { .drop_inode = generic_delete_inode, }; +#ifdef IOP_IS_NOT_CONST +static struct inode_operations dlmfs_file_inode_operations = { +#else static const struct inode_operations dlmfs_file_inode_operations = { +#endif .getattr = simple_getattr, };
fs/ocfs2/file.c +8 -0
@@ -2245,7 +2245,11 @@ bail:return ret; } +#ifdef IOP_IS_NOT_CONST +struct inode_operations ocfs2_file_iops = { +#else const struct inode_operations ocfs2_file_iops = { +#endif .setattr = ocfs2_setattr, .getattr = ocfs2_getattr, .permission = ocfs2_permission,
@@ -2257,7 +2261,11 @@ const struct inode_operations ocfs2_file_iops = { .fiemap = ocfs2_fiemap, }; +#ifdef IOP_IS_NOT_CONST +struct inode_operations ocfs2_special_file_iops = { +#else const struct inode_operations ocfs2_special_file_iops = { +#endif .setattr = ocfs2_setattr, .getattr = ocfs2_getattr, .permission = ocfs2_permission,
fs/ocfs2/file.h +5 -0
@@ -30,8 +30,13 @@ extern const struct file_operations ocfs2_fops;extern const struct file_operations ocfs2_dops;extern const struct file_operations ocfs2_fops_no_plocks;extern const struct file_operations ocfs2_dops_no_plocks; +#ifdef IOP_IS_NOT_CONST +extern struct inode_operations ocfs2_file_iops; +extern struct inode_operations ocfs2_special_file_iops; +#else extern const struct inode_operations ocfs2_file_iops;extern const struct inode_operations ocfs2_special_file_iops; +#endif struct ocfs2_alloc_context ;enum ocfs2_alloc_restarted ;
fs/ocfs2/namei.c +4 -0
@@ -2309,7 +2309,11 @@ leave:return status; } +#ifdef IOP_IS_NOT_CONST +struct inode_operations ocfs2_dir_iops = { +#else const struct inode_operations ocfs2_dir_iops = { +#endif .create = ocfs2_create, .lookup = ocfs2_lookup, .link = ocfs2_link,
fs/ocfs2/namei.h +4 -0
@@ -26,7 +26,11 @@#ifndef OCFS2_NAMEI_H #define OCFS2_NAMEI_H +#ifdef IOP_IS_NOT_CONST +extern struct inode_operations ocfs2_dir_iops; +#else extern const struct inode_operations ocfs2_dir_iops; +#endif struct dentry *ocfs2_get_parent (struct dentry *child);
fs/ocfs2/symlink.c +9 -0
@@ -153,7 +153,11 @@ static void ocfs2_fast_put_link(struct dentry *dentry, struct nameidata *nd, voikfree (link); } +#ifdef IOP_IS_NOT_CONST +struct inode_operations ocfs2_symlink_inode_operations = { +#else const struct inode_operations ocfs2_symlink_inode_operations = { +#endif .readlink = page_readlink, .follow_link = page_follow_link_light, .put_link = page_put_link,
@@ -164,7 +168,12 @@ const struct inode_operations ocfs2_symlink_inode_operations = { .listxattr = ocfs2_listxattr, .removexattr = generic_removexattr, }; + +#ifdef IOP_IS_NOT_CONST +struct inode_operations ocfs2_fast_symlink_inode_operations = { +#else const struct inode_operations ocfs2_fast_symlink_inode_operations = { +#endif .readlink = ocfs2_readlink, .follow_link = ocfs2_fast_follow_link, .put_link = ocfs2_fast_put_link,
fs/ocfs2/symlink.h +5 -0
@@ -26,8 +26,13 @@#ifndef OCFS2_SYMLINK_H #define OCFS2_SYMLINK_H +#ifdef IOP_IS_NOT_CONST +extern struct inode_operations ocfs2_symlink_inode_operations; +extern struct inode_operations ocfs2_fast_symlink_inode_operations; +#else extern const struct inode_operations ocfs2_symlink_inode_operations;extern const struct inode_operations ocfs2_fast_symlink_inode_operations; +#endif /* * Test whether an inode is a fast symlink.
Signature · 1 line
1.5.6.5
PATCH 3/8 ocfs2: Handle non-const dentry->d_op
In reply to Sunil MushranMainline commit e56980d451904b623573ef4966cbab768e433c79 const-ified dentry->d_op.
--- Config.make.in | 1 + configure.in | 6 ++++++ fs/ocfs2/Makefile | 4 ++++ fs/ocfs2/dcache.c | 4 ++++ fs/ocfs2/dcache.h | 4 ++++ 5 files changed, 19 insertions(+), 0 deletions(-)
Config.make.in +1 -0
@@ -64,6 +64,7 @@ ADDRESS_SPACE_OPS_EXT = @ADDRESS_SPACE_OPS_EXT@ FVERSION_IS_ULONG = @FVERSION_IS_ULONG@ SEQ_OPS_IS_NOT_CONST = @SEQ_OPS_IS_NOT_CONST@ IOP_IS_NOT_CONST = @IOP_IS_NOT_CONST@ +DOP_IS_NOT_CONST = @DOP_IS_NOT_CONST@ OCFS_DEBUG = @OCFS_DEBUG@
configure.in +6 -0
@@ -242,6 +242,12 @@ OCFS2_CHECK_KERNEL([inode->i_op has the const modifier in fs.h], fs.h, AC_SUBST(IOP_IS_NOT_CONST) +DOP_IS_NOT_CONST= +OCFS2_CHECK_KERNEL([dentry->d_op has the const modifier in dcache.h], dcache.h, + , DOP_IS_NOT_CONST=yes, [^.*const struct dentry_operations \*d_op;]) +AC_SUBST(DOP_IS_NOT_CONST) + + # End kapi_compat checks # using -include has two advantages:
fs/ocfs2/Makefile +4 -0
@@ -64,6 +64,10 @@ ifdef IOP_IS_NOT_CONST EXTRA_CFLAGS += -DIOP_IS_NOT_CONST endif +ifdef DOP_IS_NOT_CONST +EXTRA_CFLAGS += -DDOP_IS_NOT_CONST +endif + # # Since SUBDIRS means something to kbuild, define them safely. Do not # include trailing slashes.
fs/ocfs2/dcache.c +4 -0
@@ -500,7 +500,11 @@ out_move:d_move (dentry, target); } +#ifdef DOP_IS_NOT_CONST +struct dentry_operations ocfs2_dentry_ops = { +#else const struct dentry_operations ocfs2_dentry_ops = { +#endif .d_revalidate = ocfs2_dentry_revalidate, .d_iput = ocfs2_dentry_iput, };
fs/ocfs2/dcache.h +4 -0
@@ -26,7 +26,11 @@#ifndef OCFS2_DCACHE_H #define OCFS2_DCACHE_H +#ifdef DOP_IS_NOT_CONST +extern struct dentry_operations ocfs2_dentry_ops; +#else extern const struct dentry_operations ocfs2_dentry_ops; +#endif struct ocfs2_dentry_lock {/* Use count of dentry lock */
Signature · 1 line
1.5.6.5
PATCH 4/8 ocfs2: Handle non-const sb->s_op
In reply to Sunil MushranMainline commit ee9b6d61a2a43c5952eb43283f8db284a4e70b8a const-ified sb->s_op.
--- Config.make.in | 1 + configure.in | 5 +++++ fs/ocfs2/Makefile | 4 ++++ fs/ocfs2/dlm/Makefile | 4 ++++ fs/ocfs2/dlm/dlmfs.c | 8 ++++++++ fs/ocfs2/super.c | 4 ++++ 6 files changed, 26 insertions(+), 0 deletions(-)
Config.make.in +1 -0
@@ -65,6 +65,7 @@ FVERSION_IS_ULONG = @FVERSION_IS_ULONG@ SEQ_OPS_IS_NOT_CONST = @SEQ_OPS_IS_NOT_CONST@ IOP_IS_NOT_CONST = @IOP_IS_NOT_CONST@ DOP_IS_NOT_CONST = @DOP_IS_NOT_CONST@ +SOP_IS_NOT_CONST = @SOP_IS_NOT_CONST@ OCFS_DEBUG = @OCFS_DEBUG@
configure.in +5 -0
@@ -247,6 +247,11 @@ OCFS2_CHECK_KERNEL([dentry->d_op has the const modifier in dcache.h], dcache.h, , DOP_IS_NOT_CONST=yes, [^.*const struct dentry_operations \*d_op;]) AC_SUBST(DOP_IS_NOT_CONST) +SOP_IS_NOT_CONST= +OCFS2_CHECK_KERNEL([sb->s_op has the const modifier in fs.h], fs.h, + , SOP_IS_NOT_CONST=yes, [^.*const struct super_operations.*\*s_op;]) +AC_SUBST(SOP_IS_NOT_CONST) + # End kapi_compat checks
fs/ocfs2/Makefile +4 -0
@@ -68,6 +68,10 @@ ifdef DOP_IS_NOT_CONST EXTRA_CFLAGS += -DDOP_IS_NOT_CONST endif +ifdef SOP_IS_NOT_CONST +EXTRA_CFLAGS += -DSOP_IS_NOT_CONST +endif + # # Since SUBDIRS means something to kbuild, define them safely. Do not # include trailing slashes.
fs/ocfs2/dlm/Makefile +4 -0
@@ -34,6 +34,10 @@ ifdef IOP_IS_NOT_CONST EXTRA_CFLAGS += -DIOP_IS_NOT_CONST endif +ifdef SOP_IS_NOT_CONST +EXTRA_CFLAGS += -DSOP_IS_NOT_CONST +endif + DLM_SOURCES += \ dlmast.c \ dlmconvert.c \
fs/ocfs2/dlm/dlmfs.c +8 -0
@@ -62,7 +62,11 @@#include "ocfs2_lockingver.h" +#ifdef SOP_IS_NOT_CONST +static struct super_operations dlmfs_ops; +#else static const struct super_operations dlmfs_ops; +#endif static const struct file_operations dlmfs_file_operations;#ifdef IOP_IS_NOT_CONST static struct inode_operations dlmfs_dir_inode_operations;
@@ -580,7 +584,11 @@ static const struct inode_operations dlmfs_root_inode_operations = { .rmdir = simple_rmdir, }; +#ifdef SOP_IS_NOT_CONST +static struct super_operations dlmfs_ops = { +#else static const struct super_operations dlmfs_ops = { +#endif .statfs = simple_statfs, .alloc_inode = dlmfs_alloc_inode, .destroy_inode = dlmfs_destroy_inode,
fs/ocfs2/super.c +4 -0
@@ -135,7 +135,11 @@ static int ocfs2_susp_quotas(struct ocfs2_super *osb, int unsuspend);static int ocfs2_enable_quotas (struct ocfs2_super *osb);static void ocfs2_disable_quotas (struct ocfs2_super *osb); +#ifdef SOP_IS_NOT_CONST +static struct super_operations ocfs2_sops = { +#else static const struct super_operations ocfs2_sops = { +#endif .statfs = ocfs2_statfs, .alloc_inode = ocfs2_alloc_inode, .destroy_inode = ocfs2_destroy_inode,
Signature · 1 line
1.5.6.5
PATCH 5/8 ocfs2: Handle non-const sb->s_export_op
In reply to Sunil MushranMainline commit 39655164405940d4818224a085e35420e2f97aed const-ified sb->s_export_op.
--- Config.make.in | 1 + configure.in | 5 +++++ fs/ocfs2/Makefile | 4 ++++ fs/ocfs2/export.c | 4 ++++ fs/ocfs2/export.h | 4 ++++ 5 files changed, 18 insertions(+), 0 deletions(-)
Config.make.in +1 -0
@@ -66,6 +66,7 @@ SEQ_OPS_IS_NOT_CONST = @SEQ_OPS_IS_NOT_CONST@ IOP_IS_NOT_CONST = @IOP_IS_NOT_CONST@ DOP_IS_NOT_CONST = @DOP_IS_NOT_CONST@ SOP_IS_NOT_CONST = @SOP_IS_NOT_CONST@ +EXPORTOP_IS_NOT_CONST = @EXPORTOP_IS_NOT_CONST@ OCFS_DEBUG = @OCFS_DEBUG@
configure.in +5 -0
@@ -252,6 +252,11 @@ OCFS2_CHECK_KERNEL([sb->s_op has the const modifier in fs.h], fs.h, , SOP_IS_NOT_CONST=yes, [^.*const struct super_operations.*\*s_op;]) AC_SUBST(SOP_IS_NOT_CONST) +EXPORTOP_IS_NOT_CONST= +OCFS2_CHECK_KERNEL([sb->s_export_op has the const modifier in fs.h], fs.h, + , EXPORTOP_IS_NOT_CONST=yes, [^.*const struct export_operations \*s_export_op;]) +AC_SUBST(EXPORTOP_IS_NOT_CONST) + # End kapi_compat checks
fs/ocfs2/Makefile +4 -0
@@ -72,6 +72,10 @@ ifdef SOP_IS_NOT_CONST EXTRA_CFLAGS += -DSOP_IS_NOT_CONST endif +ifdef EXPORTOP_IS_NOT_CONST +EXTRA_CFLAGS += -DEXPORTOP_IS_NOT_CONST +endif + # # Since SUBDIRS means something to kbuild, define them safely. Do not # include trailing slashes.
fs/ocfs2/export.c +4 -0
@@ -275,7 +275,11 @@ static struct dentry *ocfs2_fh_to_parent(struct super_block *sb,return ocfs2_get_dentry (sb, &parent); } +#ifdef EXPORTOP_IS_NOT_CONST +struct export_operations ocfs2_export_ops = { +#else const struct export_operations ocfs2_export_ops = { +#endif .encode_fh = ocfs2_encode_fh, .fh_to_dentry = ocfs2_fh_to_dentry, .fh_to_parent = ocfs2_fh_to_parent,
fs/ocfs2/export.h +4 -0
@@ -28,6 +28,10 @@#include <linux/exportfs.h> +#ifdef EXPORTOP_IS_NOT_CONST +extern struct export_operations ocfs2_export_ops; +#else extern const struct export_operations ocfs2_export_ops; +#endif #endif /* OCFS2_EXPORT_H */
Signature · 1 line
1.5.6.5
PATCH 6/8 ocfs2: Handle missing const modifier in match_token() args
In reply to Sunil MushranMainline commit a447c0932445f92ce6f4c1bd020f62c5097a7842 const-ified match_table_t argument in match_token().
--- Config.make.in | 1 + configure.in | 5 +++++ fs/ocfs2/Makefile | 4 ++++ fs/ocfs2/super.c | 4 ++++ 4 files changed, 14 insertions(+), 0 deletions(-)
Config.make.in +1 -0
@@ -67,6 +67,7 @@ IOP_IS_NOT_CONST = @IOP_IS_NOT_CONST@ DOP_IS_NOT_CONST = @DOP_IS_NOT_CONST@ SOP_IS_NOT_CONST = @SOP_IS_NOT_CONST@ EXPORTOP_IS_NOT_CONST = @EXPORTOP_IS_NOT_CONST@ +MATCHTABLE_IS_NOT_CONST = @MATCHTABLE_IS_NOT_CONST@ OCFS_DEBUG = @OCFS_DEBUG@
configure.in +5 -0
@@ -257,6 +257,11 @@ OCFS2_CHECK_KERNEL([sb->s_export_op has the const modifier in fs.h], fs.h, , EXPORTOP_IS_NOT_CONST=yes, [^.*const struct export_operations \*s_export_op;]) AC_SUBST(EXPORTOP_IS_NOT_CONST) +MATCHTABLE_IS_NOT_CONST= +OCFS2_CHECK_KERNEL([match_token() takes const arg in parser.h], parser.h, + , MATCHTABLE_IS_NOT_CONST=yes, [^int match_token(char \*, const match_table_t table, ]) +AC_SUBST(MATCHTABLE_IS_NOT_CONST) + # End kapi_compat checks
fs/ocfs2/Makefile +4 -0
@@ -76,6 +76,10 @@ ifdef EXPORTOP_IS_NOT_CONST EXTRA_CFLAGS += -DEXPORTOP_IS_NOT_CONST endif +ifdef MATCHTABLE_IS_NOT_CONST +EXTRA_CFLAGS += -DMATCHTABLE_IS_NOT_CONST +endif + # # Since SUBDIRS means something to kbuild, define them safely. Do not # include trailing slashes.
fs/ocfs2/super.c +4 -0
@@ -180,7 +180,11 @@ enum { Opt_err, }; +#ifdef MATCHTABLE_IS_NOT_CONST +static match_table_t tokens = { +#else static const match_table_t tokens = { +#endif {Opt_barrier, "barrier=%u"}, {Opt_err_panic, "errors=panic"}, {Opt_err_ro, "errors=remount-ro"},
Signature · 1 line
1.5.6.5
PATCH 7/8 ocfs2: Handle non-const vm_area_struct->vm_ops
In reply to Sunil MushranMainline commit f0f37e2f77731b3473fa6bd5ee53255d9a9cdb40 const-ified vm_area_struct->vm_ops.
--- Config.make.in | 1 + configure.in | 5 +++++ fs/ocfs2/Makefile | 4 ++++ fs/ocfs2/mmap.c | 4 ++++ 4 files changed, 14 insertions(+), 0 deletions(-)
Config.make.in +1 -0
@@ -68,6 +68,7 @@ DOP_IS_NOT_CONST = @DOP_IS_NOT_CONST@ SOP_IS_NOT_CONST = @SOP_IS_NOT_CONST@ EXPORTOP_IS_NOT_CONST = @EXPORTOP_IS_NOT_CONST@ MATCHTABLE_IS_NOT_CONST = @MATCHTABLE_IS_NOT_CONST@ +VMOP_IS_NOT_CONST = @VMOP_IS_NOT_CONST@ OCFS_DEBUG = @OCFS_DEBUG@
configure.in +5 -0
@@ -262,6 +262,11 @@ OCFS2_CHECK_KERNEL([match_token() takes const arg in parser.h], parser.h, , MATCHTABLE_IS_NOT_CONST=yes, [^int match_token(char \*, const match_table_t table, ]) AC_SUBST(MATCHTABLE_IS_NOT_CONST) +VMOP_IS_NOT_CONST= +OCFS2_CHECK_KERNEL([vm_area_struct->vm_ops has the const modifier in mm.h], mm.h, + , VMOP_IS_NOT_CONST=yes, [^.*const struct vm_operations_struct \*vm_ops;]) +AC_SUBST(VMOP_IS_NOT_CONST) + # End kapi_compat checks
fs/ocfs2/Makefile +4 -0
@@ -80,6 +80,10 @@ ifdef MATCHTABLE_IS_NOT_CONST EXTRA_CFLAGS += -DMATCHTABLE_IS_NOT_CONST endif +ifdef VMOP_IS_NOT_CONST +EXTRA_CFLAGS += -DVMOP_IS_NOT_CONST +endif + # # Since SUBDIRS means something to kbuild, define them safely. Do not # include trailing slashes.
fs/ocfs2/mmap.c +4 -0
@@ -202,7 +202,11 @@ out:return ret; } +#ifdef VMOP_IS_NOT_CONST +static struct vm_operations_struct ocfs2_file_vm_ops = { +#else static const struct vm_operations_struct ocfs2_file_vm_ops = { +#endif .fault = ocfs2_fault, .page_mkwrite = ocfs2_page_mkwrite, };
Signature · 1 line
1.5.6.5
PATCH 8/8 ocfs2: Handle missing const modifier in seq_open()
In reply to Sunil MushranMainline commit 15ad7cdcfd76450d4beebc789ec646664238184d added the const modifier to struct seq_operations * in seq_open().
--- Config.make.in | 1 + configure.in | 5 +++++ fs/ocfs2/cluster/Makefile | 4 ++++ fs/ocfs2/cluster/netdebug.c | 8 ++++++++ fs/ocfs2/dlm/Makefile | 4 ++++ fs/ocfs2/dlm/dlmdebug.c | 4 ++++ 6 files changed, 26 insertions(+), 0 deletions(-)
Config.make.in +1 -0
@@ -69,6 +69,7 @@ SOP_IS_NOT_CONST = @SOP_IS_NOT_CONST@ EXPORTOP_IS_NOT_CONST = @EXPORTOP_IS_NOT_CONST@ MATCHTABLE_IS_NOT_CONST = @MATCHTABLE_IS_NOT_CONST@ VMOP_IS_NOT_CONST = @VMOP_IS_NOT_CONST@ +SEQOP_IS_NOT_CONST = @SEQOP_IS_NOT_CONST@ OCFS_DEBUG = @OCFS_DEBUG@
configure.in +5 -0
@@ -267,6 +267,11 @@ OCFS2_CHECK_KERNEL([vm_area_struct->vm_ops has the const modifier in mm.h], mm.h , VMOP_IS_NOT_CONST=yes, [^.*const struct vm_operations_struct \*vm_ops;]) AC_SUBST(VMOP_IS_NOT_CONST) +SEQOP_IS_NOT_CONST= +OCFS2_CHECK_KERNEL([seq_open() has const struct seq_operations * in seq_file.h], seq_file.h, + , SEQOP_IS_NOT_CONST=yes, [int seq_open(struct file \*, const struct seq_operations \*);]) +AC_SUBST(SEQOP_IS_NOT_CONST) + # End kapi_compat checks
fs/ocfs2/cluster/Makefile +4 -0
@@ -22,6 +22,10 @@ ifdef NO_DELAYED_WORK_STRUCT EXTRA_CFLAGS += -DNO_DELAYED_WORK_STRUCT endif +ifdef SEQOP_IS_NOT_CONST +EXTRA_CFLAGS += -DSEQOP_IS_NOT_CONST +endif + SOURCES += \ heartbeat.c \ masklog.c \
fs/ocfs2/cluster/netdebug.c +8 -0
@@ -163,7 +163,11 @@ static void nst_seq_stop(struct seq_file *seq, void *v) { } +#ifdef SEQOP_IS_NOT_CONST +static struct seq_operations nst_seq_ops = { +#else static const struct seq_operations nst_seq_ops = { +#endif .start = nst_seq_start, .next = nst_seq_next, .stop = nst_seq_stop,
@@ -344,7 +348,11 @@ static void sc_seq_stop(struct seq_file *seq, void *v) { } +#ifdef SEQOP_IS_NOT_CONST +static struct seq_operations sc_seq_ops = { +#else static const struct seq_operations sc_seq_ops = { +#endif .start = sc_seq_start, .next = sc_seq_next, .stop = sc_seq_stop,
fs/ocfs2/dlm/Makefile +4 -0
@@ -38,6 +38,10 @@ ifdef SOP_IS_NOT_CONST EXTRA_CFLAGS += -DSOP_IS_NOT_CONST endif +ifdef SEQOP_IS_NOT_CONST +EXTRA_CFLAGS += -DSEQOP_IS_NOT_CONST +endif + DLM_SOURCES += \ dlmast.c \ dlmconvert.c \
fs/ocfs2/dlm/dlmdebug.c +4 -0
@@ -682,7 +682,11 @@ static int lockres_seq_show(struct seq_file *s, void *v)return 0 ; } +#ifdef SEQOP_IS_NOT_CONST +static struct seq_operations debug_lockres_ops = { +#else static const struct seq_operations debug_lockres_ops = { +#endif .start = lockres_seq_start, .stop = lockres_seq_stop, .next = lockres_seq_next,
Signature · 1 line
1.5.6.5
Quoted 2 lines · Sunil Mushran
The third set of patches that deal with missing const modifier in various places in the el5 kernel.
Ack.
Joel
Signature · 9 lines
Life's Little Instruction Book #452 "Never compromise your integrity." Joel Becker Principal Software Developer Oracle E-mail: joel.becker at oracle.com Phone: (650) 506-8127