projects
/
deliverable
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[PATCH] mark struct inode_operations const 1
[deliverable/linux.git]
/
fs
/
cramfs
/
inode.c
diff --git
a/fs/cramfs/inode.c
b/fs/cramfs/inode.c
index a624c3ec81892870545cd80bea3f22c91069c2ab..0367d200a2debe8fdaaf6f83f559391d6107d13d 100644
(file)
--- a/
fs/cramfs/inode.c
+++ b/
fs/cramfs/inode.c
@@
-28,7
+28,7
@@
#include <asm/uaccess.h>
static struct super_operations cramfs_ops;
#include <asm/uaccess.h>
static struct super_operations cramfs_ops;
-static struct inode_operations cramfs_dir_inode_operations;
+static
const
struct inode_operations cramfs_dir_inode_operations;
static const struct file_operations cramfs_directory_operations;
static const struct address_space_operations cramfs_aops;
static const struct file_operations cramfs_directory_operations;
static const struct address_space_operations cramfs_aops;
@@
-338,7
+338,7
@@
static int cramfs_statfs(struct dentry *dentry, struct kstatfs *buf)
*/
static int cramfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
{
*/
static int cramfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
{
- struct inode *inode = filp->f_dentry->d_inode;
+ struct inode *inode = filp->f_
path.
dentry->d_inode;
struct super_block *sb = inode->i_sb;
char *buf;
unsigned int offset;
struct super_block *sb = inode->i_sb;
char *buf;
unsigned int offset;
@@
-481,6
+481,8
@@
static int cramfs_readpage(struct file *file, struct page * page)
pgdata = kmap(page);
if (compr_len == 0)
; /* hole */
pgdata = kmap(page);
if (compr_len == 0)
; /* hole */
+ else if (compr_len > (PAGE_CACHE_SIZE << 1))
+ printk(KERN_ERR "cramfs: bad compressed blocksize %u\n", compr_len);
else {
mutex_lock(&read_mutex);
bytes_filled = cramfs_uncompress_block(pgdata,
else {
mutex_lock(&read_mutex);
bytes_filled = cramfs_uncompress_block(pgdata,
@@
-516,7
+518,7
@@
static const struct file_operations cramfs_directory_operations = {
.readdir = cramfs_readdir,
};
.readdir = cramfs_readdir,
};
-static struct inode_operations cramfs_dir_inode_operations = {
+static
const
struct inode_operations cramfs_dir_inode_operations = {
.lookup = cramfs_lookup,
};
.lookup = cramfs_lookup,
};
This page took
0.024582 seconds
and
5
git commands to generate.