Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 57510
b: refs/heads/master
c: eeb47d1
h: refs/heads/master
v: v3
  • Loading branch information
Mark Fasheh committed Jun 6, 2007
1 parent f3404cd commit 6aa04e5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 59be7dc97bacc0fd8e22f0be6e2aebb5c9b4ff47
refs/heads/master: eeb47d1234af1a9267836f680a8e114b2e88d0dc
20 changes: 10 additions & 10 deletions trunk/fs/ocfs2/aops.c
Original file line number Diff line number Diff line change
Expand Up @@ -798,6 +798,11 @@ int ocfs2_map_and_write_splice_data(struct inode *inode,
}
to = from + bytes;

BUG_ON(from > PAGE_CACHE_SIZE);
BUG_ON(to > PAGE_CACHE_SIZE);
BUG_ON(from < cluster_start);
BUG_ON(to > cluster_end);

if (wc->w_this_page_new)
ret = ocfs2_map_page_blocks(wc->w_this_page, p_blkno, inode,
cluster_start, cluster_end, 1);
Expand All @@ -809,11 +814,6 @@ int ocfs2_map_and_write_splice_data(struct inode *inode,
goto out;
}

BUG_ON(from > PAGE_CACHE_SIZE);
BUG_ON(to > PAGE_CACHE_SIZE);
BUG_ON(from > osb->s_clustersize);
BUG_ON(to > osb->s_clustersize);

src = buf->ops->map(sp->s_pipe, buf, 1);
dst = kmap_atomic(wc->w_this_page, KM_USER1);
memcpy(dst + from, src + src_from, bytes);
Expand Down Expand Up @@ -890,6 +890,11 @@ int ocfs2_map_and_write_user_data(struct inode *inode,

to = from + bytes;

BUG_ON(from > PAGE_CACHE_SIZE);
BUG_ON(to > PAGE_CACHE_SIZE);
BUG_ON(from < cluster_start);
BUG_ON(to > cluster_end);

if (wc->w_this_page_new)
ret = ocfs2_map_page_blocks(wc->w_this_page, p_blkno, inode,
cluster_start, cluster_end, 1);
Expand All @@ -901,11 +906,6 @@ int ocfs2_map_and_write_user_data(struct inode *inode,
goto out;
}

BUG_ON(from > PAGE_CACHE_SIZE);
BUG_ON(to > PAGE_CACHE_SIZE);
BUG_ON(from > osb->s_clustersize);
BUG_ON(to > osb->s_clustersize);

dst = kmap(wc->w_this_page);
memcpy(dst + from, bp->b_src_buf + src_from, bytes);
kunmap(wc->w_this_page);
Expand Down

0 comments on commit 6aa04e5

Please sign in to comment.