aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/binfmt_flat.c2
-rw-r--r--fs/ocfs2/aops.c20
-rw-r--r--fs/ocfs2/cluster/masklog.c3
3 files changed, 12 insertions, 13 deletions
diff --git a/fs/binfmt_flat.c b/fs/binfmt_flat.c
index 7b0265d7f3a8..861141b4f6d6 100644
--- a/fs/binfmt_flat.c
+++ b/fs/binfmt_flat.c
@@ -558,7 +558,7 @@ static int load_flat_file(struct linux_binprm * bprm,
558 if (!realdatastart) 558 if (!realdatastart)
559 realdatastart = (unsigned long) -ENOMEM; 559 realdatastart = (unsigned long) -ENOMEM;
560 printk("Unable to allocate RAM for process data, errno %d\n", 560 printk("Unable to allocate RAM for process data, errno %d\n",
561 (int)-datapos); 561 (int)-realdatastart);
562 do_munmap(current->mm, textpos, text_len); 562 do_munmap(current->mm, textpos, text_len);
563 ret = realdatastart; 563 ret = realdatastart;
564 goto err; 564 goto err;
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c
index 0023b31e48a8..a480b09c79b9 100644
--- a/fs/ocfs2/aops.c
+++ b/fs/ocfs2/aops.c
@@ -798,6 +798,11 @@ int ocfs2_map_and_write_splice_data(struct inode *inode,
798 } 798 }
799 to = from + bytes; 799 to = from + bytes;
800 800
801 BUG_ON(from > PAGE_CACHE_SIZE);
802 BUG_ON(to > PAGE_CACHE_SIZE);
803 BUG_ON(from < cluster_start);
804 BUG_ON(to > cluster_end);
805
801 if (wc->w_this_page_new) 806 if (wc->w_this_page_new)
802 ret = ocfs2_map_page_blocks(wc->w_this_page, p_blkno, inode, 807 ret = ocfs2_map_page_blocks(wc->w_this_page, p_blkno, inode,
803 cluster_start, cluster_end, 1); 808 cluster_start, cluster_end, 1);
@@ -809,11 +814,6 @@ int ocfs2_map_and_write_splice_data(struct inode *inode,
809 goto out; 814 goto out;
810 } 815 }
811 816
812 BUG_ON(from > PAGE_CACHE_SIZE);
813 BUG_ON(to > PAGE_CACHE_SIZE);
814 BUG_ON(from > osb->s_clustersize);
815 BUG_ON(to > osb->s_clustersize);
816
817 src = buf->ops->map(sp->s_pipe, buf, 1); 817 src = buf->ops->map(sp->s_pipe, buf, 1);
818 dst = kmap_atomic(wc->w_this_page, KM_USER1); 818 dst = kmap_atomic(wc->w_this_page, KM_USER1);
819 memcpy(dst + from, src + src_from, bytes); 819 memcpy(dst + from, src + src_from, bytes);
@@ -890,6 +890,11 @@ int ocfs2_map_and_write_user_data(struct inode *inode,
890 890
891 to = from + bytes; 891 to = from + bytes;
892 892
893 BUG_ON(from > PAGE_CACHE_SIZE);
894 BUG_ON(to > PAGE_CACHE_SIZE);
895 BUG_ON(from < cluster_start);
896 BUG_ON(to > cluster_end);
897
893 if (wc->w_this_page_new) 898 if (wc->w_this_page_new)
894 ret = ocfs2_map_page_blocks(wc->w_this_page, p_blkno, inode, 899 ret = ocfs2_map_page_blocks(wc->w_this_page, p_blkno, inode,
895 cluster_start, cluster_end, 1); 900 cluster_start, cluster_end, 1);
@@ -901,11 +906,6 @@ int ocfs2_map_and_write_user_data(struct inode *inode,
901 goto out; 906 goto out;
902 } 907 }
903 908
904 BUG_ON(from > PAGE_CACHE_SIZE);
905 BUG_ON(to > PAGE_CACHE_SIZE);
906 BUG_ON(from > osb->s_clustersize);
907 BUG_ON(to > osb->s_clustersize);
908
909 dst = kmap(wc->w_this_page); 909 dst = kmap(wc->w_this_page);
910 memcpy(dst + from, bp->b_src_buf + src_from, bytes); 910 memcpy(dst + from, bp->b_src_buf + src_from, bytes);
911 kunmap(wc->w_this_page); 911 kunmap(wc->w_this_page);
diff --git a/fs/ocfs2/cluster/masklog.c b/fs/ocfs2/cluster/masklog.c
index a93620ce4aca..2b205f5d5790 100644
--- a/fs/ocfs2/cluster/masklog.c
+++ b/fs/ocfs2/cluster/masklog.c
@@ -144,8 +144,7 @@ static struct kobj_type mlog_ktype = {
144}; 144};
145 145
146static struct kset mlog_kset = { 146static struct kset mlog_kset = {
147 .kobj = {.name = "logmask"}, 147 .kobj = {.name = "logmask", .ktype = &mlog_ktype},
148 .ktype = &mlog_ktype
149}; 148};
150 149
151int mlog_sys_init(struct kset *o2cb_subsys) 150int mlog_sys_init(struct kset *o2cb_subsys)