From f5e54d6e53a20cef45af7499e86164f0e0d16bb2 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Wed, 28 Jun 2006 04:26:44 -0700 Subject: [PATCH] mark address_space_operations const Same as with already do with the file operations: keep them in .rodata and prevents people from doing runtime patching. Signed-off-by: Christoph Hellwig Cc: Steven French Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/cifs/file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fs/cifs/file.c') diff --git a/fs/cifs/file.c b/fs/cifs/file.c index e9c1573..5861eb4 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@ -1942,7 +1942,7 @@ static int cifs_prepare_write(struct file *file, struct page *page, return 0; } -struct address_space_operations cifs_addr_ops = { +const struct address_space_operations cifs_addr_ops = { .readpage = cifs_readpage, .readpages = cifs_readpages, .writepage = cifs_writepage, @@ -1959,7 +1959,7 @@ struct address_space_operations cifs_addr_ops = { * contain the header plus one complete page of data. Otherwise, we need * to leave cifs_readpages out of the address space operations. */ -struct address_space_operations cifs_addr_ops_smallbuf = { +const struct address_space_operations cifs_addr_ops_smallbuf = { .readpage = cifs_readpage, .writepage = cifs_writepage, .writepages = cifs_writepages, -- cgit v1.1