diff options
author | Jan Kara <jack@suse.cz> | 2007-10-10 10:25:42 -0400 |
---|---|---|
committer | Mark Fasheh <mark.fasheh@oracle.com> | 2007-11-06 18:35:35 -0500 |
commit | bc7e97cbdd4bef162e5772c74ee2cc4487a2d997 (patch) | |
tree | cf35117281896022e70a4fd5655ccc2f0f8bfcf3 /fs | |
parent | 4e9563fd55ff4479f2b118d0757d121dd0cfc39c (diff) |
[PATCH] Fix possibly too long write in o2hb_setup_one_bio()
We should subtract start of our IO from PAGE_CACHE_SIZE to get the right
length of the write we want to perform.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ocfs2/cluster/heartbeat.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ocfs2/cluster/heartbeat.c b/fs/ocfs2/cluster/heartbeat.c index 9cc7c0418b70..f02ccb34604d 100644 --- a/fs/ocfs2/cluster/heartbeat.c +++ b/fs/ocfs2/cluster/heartbeat.c | |||
@@ -267,7 +267,7 @@ static struct bio *o2hb_setup_one_bio(struct o2hb_region *reg, | |||
267 | current_page = cs / spp; | 267 | current_page = cs / spp; |
268 | page = reg->hr_slot_data[current_page]; | 268 | page = reg->hr_slot_data[current_page]; |
269 | 269 | ||
270 | vec_len = min(PAGE_CACHE_SIZE, | 270 | vec_len = min(PAGE_CACHE_SIZE - vec_start, |
271 | (max_slots-cs) * (PAGE_CACHE_SIZE/spp) ); | 271 | (max_slots-cs) * (PAGE_CACHE_SIZE/spp) ); |
272 | 272 | ||
273 | mlog(ML_HB_BIO, "page %d, vec_len = %u, vec_start = %u\n", | 273 | mlog(ML_HB_BIO, "page %d, vec_len = %u, vec_start = %u\n", |