Skip to contentSkip to conversation

fix constness warning in dmapi

PATCH In review Christoph Hellwig 2 participants 2 messages Jul 14, 2007 XFS filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix constness warning in dmapi

File operations are const now so make sure the dmapi code propagates this properly.

fs/dmapi/dmapi_kern.h +1 -1
Index: linux-2.6-xfs/fs/dmapi/dmapi_kern.h
===================================================================
@@ -79,7 +79,7 @@ struct filesystem_dmapi_operations {
 	int (*get_fsys_vector)(struct super_block *sb, void *addr);
 	int (*fh_to_inode)(struct super_block *sb, struct inode **ip,
 			   dm_fid_t *fid);
-	struct file_operations * (*get_invis_ops)(struct inode *ip);
+	const struct file_operations * (*get_invis_ops)(struct inode *ip);
 	int (*inode_to_fh)(struct inode *ip, dm_fid_t *fid,
 			   dm_fsid_t *fsid );
 	void (*get_fsid)(struct super_block *sb, dm_fsid_t *fsid);
fs/xfs/dmapi/xfs_dm_fsops.c +1 -1
Index: linux-2.6-xfs/fs/xfs/dmapi/xfs_dm_fsops.c
===================================================================
@@ -49,7 +49,7 @@
 #include "xfs_dm.h"
 
 
-STATIC struct file_operations *
+STATIC const struct file_operations *
 xfs_dm_get_invis_ops(
 	struct inode *ip)
 {
#1 lore raw
Quoted 2 lines · Christoph Hellwig

File operations are const now so make sure the dmapi code propagates this properly.

ACK. Surprised that was still there :)

Quoted 31 lines

Index: linux-2.6-xfs/fs/dmapi/dmapi_kern.h
===================================================================

fs/dmapi/dmapi_kern.h +1 -1
@@ -79,7 +79,7 @@ struct filesystem_dmapi_operations {
 	int (*get_fsys_vector)(struct super_block *sb, void *addr);
 	int (*fh_to_inode)(struct super_block *sb, struct inode **ip,
 			   dm_fid_t *fid);
-	struct file_operations * (*get_invis_ops)(struct inode *ip);
+	const struct file_operations * (*get_invis_ops)(struct inode *ip);
 	int (*inode_to_fh)(struct inode *ip, dm_fid_t *fid,
 			   dm_fsid_t *fsid );
 	void (*get_fsid)(struct super_block *sb, dm_fsid_t *fsid);

Index: linux-2.6-xfs/fs/xfs/dmapi/xfs_dm_fsops.c
===================================================================

fs/xfs/dmapi/xfs_dm_fsops.c +1 -1
@@ -49,7 +49,7 @@
 #include "xfs_dm.h"
 
 
-STATIC struct file_operations *
+STATIC const struct file_operations *
 xfs_dm_get_invis_ops(
 	struct inode *ip)
 {