diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ecryptfs/crypto.c | 25 | ||||
-rw-r--r-- | fs/jffs2/acl.c | 2 | ||||
-rw-r--r-- | fs/mbcache.c | 2 | ||||
-rw-r--r-- | fs/proc/proc_net.c | 2 | ||||
-rw-r--r-- | fs/proc/proc_sysctl.c | 6 |
5 files changed, 16 insertions, 21 deletions
diff --git a/fs/ecryptfs/crypto.c b/fs/ecryptfs/crypto.c index 0a9882edf562..9d70289f7df3 100644 --- a/fs/ecryptfs/crypto.c +++ b/fs/ecryptfs/crypto.c @@ -279,13 +279,13 @@ int virt_to_scatterlist(const void *addr, int size, struct scatterlist *sg, int offset; int remainder_of_page; + sg_init_table(sg, sg_size); + while (size > 0 && i < sg_size) { pg = virt_to_page(addr); offset = offset_in_page(addr); - if (sg) { - sg_set_page(&sg[i], pg); - sg[i].offset = offset; - } + if (sg) + sg_set_page(&sg[i], pg, 0, offset); remainder_of_page = PAGE_CACHE_SIZE - offset; if (size >= remainder_of_page) { if (sg) @@ -716,12 +716,8 @@ ecryptfs_encrypt_page_offset(struct ecryptfs_crypt_stat *crypt_stat, sg_init_table(&src_sg, 1); sg_init_table(&dst_sg, 1); - sg_set_page(&src_sg, src_page); - src_sg.offset = src_offset; - src_sg.length = size; - sg_set_page(&dst_sg, dst_page); - dst_sg.offset = dst_offset; - dst_sg.length = size; + sg_set_page(&src_sg, src_page, size, src_offset); + sg_set_page(&dst_sg, dst_page, size, dst_offset); return encrypt_scatterlist(crypt_stat, &dst_sg, &src_sg, size, iv); } @@ -746,14 +742,11 @@ ecryptfs_decrypt_page_offset(struct ecryptfs_crypt_stat *crypt_stat, struct scatterlist src_sg, dst_sg; sg_init_table(&src_sg, 1); + sg_set_page(&src_sg, src_page, size, src_offset); + sg_init_table(&dst_sg, 1); + sg_set_page(&dst_sg, dst_page, size, dst_offset); - sg_set_page(&src_sg, src_page); - src_sg.offset = src_offset; - src_sg.length = size; - sg_set_page(&dst_sg, dst_page); - dst_sg.offset = dst_offset; - dst_sg.length = size; return decrypt_scatterlist(crypt_stat, &dst_sg, &src_sg, size, iv); } diff --git a/fs/jffs2/acl.c b/fs/jffs2/acl.c index 9728614b8958..77fc5838609c 100644 --- a/fs/jffs2/acl.c +++ b/fs/jffs2/acl.c @@ -372,7 +372,7 @@ int jffs2_init_acl_post(struct inode *inode) return rc; } - return rc; + return 0; } void jffs2_clear_acl(struct jffs2_inode_info *f) diff --git a/fs/mbcache.c b/fs/mbcache.c index 1046cbefbfbf..eb31b73e7d69 100644 --- a/fs/mbcache.c +++ b/fs/mbcache.c @@ -403,9 +403,9 @@ mb_cache_entry_alloc(struct mb_cache *cache) { struct mb_cache_entry *ce; - atomic_inc(&cache->c_entry_count); ce = kmem_cache_alloc(cache->c_entry_cache, GFP_KERNEL); if (ce) { + atomic_inc(&cache->c_entry_count); INIT_LIST_HEAD(&ce->e_lru_list); INIT_LIST_HEAD(&ce->e_block_list); ce->e_cache = cache; diff --git a/fs/proc/proc_net.c b/fs/proc/proc_net.c index 2e91fb756e9a..749def054a34 100644 --- a/fs/proc/proc_net.c +++ b/fs/proc/proc_net.c @@ -185,7 +185,7 @@ static __net_exit void proc_net_ns_exit(struct net *net) kfree(net->proc_net_root); } -struct pernet_operations __net_initdata proc_net_ns_ops = { +static struct pernet_operations proc_net_ns_ops = { .init = proc_net_ns_init, .exit = proc_net_ns_exit, }; diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c index 680c429bfa22..4e57fcf85982 100644 --- a/fs/proc/proc_sysctl.c +++ b/fs/proc/proc_sysctl.c @@ -171,7 +171,8 @@ static ssize_t proc_sys_read(struct file *filp, char __user *buf, struct dentry *dentry = filp->f_dentry; struct ctl_table_header *head; struct ctl_table *table; - ssize_t error, res; + ssize_t error; + size_t res; table = do_proc_sys_lookup(dentry->d_parent, &dentry->d_name, &head); /* Has the sysctl entry disappeared on us? */ @@ -209,7 +210,8 @@ static ssize_t proc_sys_write(struct file *filp, const char __user *buf, struct dentry *dentry = filp->f_dentry; struct ctl_table_header *head; struct ctl_table *table; - ssize_t error, res; + ssize_t error; + size_t res; table = do_proc_sys_lookup(dentry->d_parent, &dentry->d_name, &head); /* Has the sysctl entry disappeared on us? */ |