aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/raid/bitmap.h
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2007-07-17 07:06:13 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-17 13:23:15 -0400
commit4ad1366376bfef32ec0ffa12d1faa483d6f330bd (patch)
tree87a9c864ec5ebd446f6c99f3298bc7638efa8f1e /include/linux/raid/bitmap.h
parentf0d76d70bc77b9b11256a3a23e98e80878be1578 (diff)
md: change bitmap_unplug and others to void functions
bitmap_unplug only ever returns 0, so it may as well be void. Two callers try to print a message if it returns non-zero, but that message is already printed by bitmap_file_kick. write_page returns an error which is not consistently checked. It always causes BITMAP_WRITE_ERROR to be set on an error, and that can more conveniently be checked. When the return of write_page is checked, an error causes bitmap_file_kick to be called - so move that call into write_page - and protect against recursive calls into bitmap_file_kick. bitmap_update_sb returns an error that is never checked. So make these 'void' and be consistent about checking the bit. Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/raid/bitmap.h')
-rw-r--r--include/linux/raid/bitmap.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/raid/bitmap.h b/include/linux/raid/bitmap.h
index dd5a05d03d4f..75e17a05540e 100644
--- a/include/linux/raid/bitmap.h
+++ b/include/linux/raid/bitmap.h
@@ -262,7 +262,7 @@ int bitmap_active(struct bitmap *bitmap);
262 262
263char *file_path(struct file *file, char *buf, int count); 263char *file_path(struct file *file, char *buf, int count);
264void bitmap_print_sb(struct bitmap *bitmap); 264void bitmap_print_sb(struct bitmap *bitmap);
265int bitmap_update_sb(struct bitmap *bitmap); 265void bitmap_update_sb(struct bitmap *bitmap);
266 266
267int bitmap_setallbits(struct bitmap *bitmap); 267int bitmap_setallbits(struct bitmap *bitmap);
268void bitmap_write_all(struct bitmap *bitmap); 268void bitmap_write_all(struct bitmap *bitmap);
@@ -278,8 +278,8 @@ int bitmap_start_sync(struct bitmap *bitmap, sector_t offset, int *blocks, int d
278void bitmap_end_sync(struct bitmap *bitmap, sector_t offset, int *blocks, int aborted); 278void bitmap_end_sync(struct bitmap *bitmap, sector_t offset, int *blocks, int aborted);
279void bitmap_close_sync(struct bitmap *bitmap); 279void bitmap_close_sync(struct bitmap *bitmap);
280 280
281int bitmap_unplug(struct bitmap *bitmap); 281void bitmap_unplug(struct bitmap *bitmap);
282int bitmap_daemon_work(struct bitmap *bitmap); 282void bitmap_daemon_work(struct bitmap *bitmap);
283#endif 283#endif
284 284
285#endif 285#endif