aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2006-06-28 07:26:44 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-28 17:59:04 -0400
commitf5e54d6e53a20cef45af7499e86164f0e0d16bb2 (patch)
treecb92acbb89b84796261bf5563182261ec5654127 /fs/cifs
parenta052b68b1e7a31f1e6a721290035e9deb0f6fed9 (diff)
[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 <hch@lst.de> Cc: Steven French <sfrench@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/cifsfs.h4
-rw-r--r--fs/cifs/file.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/fs/cifs/cifsfs.h b/fs/cifs/cifsfs.h
index a6384d83fdef..8f75c6f24701 100644
--- a/fs/cifs/cifsfs.h
+++ b/fs/cifs/cifsfs.h
@@ -32,8 +32,8 @@
32#define TRUE 1 32#define TRUE 1
33#endif 33#endif
34 34
35extern struct address_space_operations cifs_addr_ops; 35extern const struct address_space_operations cifs_addr_ops;
36extern struct address_space_operations cifs_addr_ops_smallbuf; 36extern const struct address_space_operations cifs_addr_ops_smallbuf;
37 37
38/* Functions related to super block operations */ 38/* Functions related to super block operations */
39extern struct super_operations cifs_super_ops; 39extern struct super_operations cifs_super_ops;
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index e9c1573f6aa7..5861eb42e626 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,
1942 return 0; 1942 return 0;
1943} 1943}
1944 1944
1945struct address_space_operations cifs_addr_ops = { 1945const struct address_space_operations cifs_addr_ops = {
1946 .readpage = cifs_readpage, 1946 .readpage = cifs_readpage,
1947 .readpages = cifs_readpages, 1947 .readpages = cifs_readpages,
1948 .writepage = cifs_writepage, 1948 .writepage = cifs_writepage,
@@ -1959,7 +1959,7 @@ struct address_space_operations cifs_addr_ops = {
1959 * contain the header plus one complete page of data. Otherwise, we need 1959 * contain the header plus one complete page of data. Otherwise, we need
1960 * to leave cifs_readpages out of the address space operations. 1960 * to leave cifs_readpages out of the address space operations.
1961 */ 1961 */
1962struct address_space_operations cifs_addr_ops_smallbuf = { 1962const struct address_space_operations cifs_addr_ops_smallbuf = {
1963 .readpage = cifs_readpage, 1963 .readpage = cifs_readpage,
1964 .writepage = cifs_writepage, 1964 .writepage = cifs_writepage,
1965 .writepages = cifs_writepages, 1965 .writepages = cifs_writepages,