Re: [PATCH][RFC] security: constify seq_operations

From: Artem Bityutskiy
Date: Sat Aug 15 2009 - 05:16:27 EST


On 08/11/2009 10:47 PM, Julia Lawall wrote:
A while ago I made a semantic patch to introduce const on file_operations
and and input_device_id types. I tested it on 142 files in which the
change had already been made and got the same result in each case. I have
run it on linux-next and obtained the attached result. However, I have
not checked any of these results, so this is not meant as a submitted
patch, but as a starting point for someone who wants to look further into
the problem.

julia


snip

diff -u -p a/fs/ubifs/xattr.c b/fs/ubifs/xattr.c
--- a/fs/ubifs/xattr.c 2009-06-27 09:35:06.000000000 +0200
+++ b/fs/ubifs/xattr.c 2009-08-11 22:42:24.000000000 +0200
@@ -80,7 +80,7 @@ enum {

static struct inode_operations none_inode_operations;
static struct address_space_operations none_address_operations;
-static struct file_operations none_file_operations;
+static const struct file_operations none_file_operations;

Fixed this in UBIFS. Also made the inode operation const. Thanks.
Pushed to ubifs-2.6.git:
http://git.infradead.org/ubifs-2.6.git/commit/2d132c333e9f88684801c9b80e6ba086da4f0ea0

--
Best Regards,
Artem Bityutskiy (ÐÑÑÑÐ ÐÐÑÑÑÐÐÐ)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/