Commit ee305ace authored by NeilBrown's avatar NeilBrown

md: remove sparse warnings about lock context.

There was a real error here on a failure path where we
incorrectly call rcu_read_unlock.
Signed-off-by: default avatarNeilBrown <neilb@suse.de>
parent a9f326eb
...@@ -108,6 +108,8 @@ static void bitmap_free_page(struct bitmap *bitmap, unsigned char *page) ...@@ -108,6 +108,8 @@ static void bitmap_free_page(struct bitmap *bitmap, unsigned char *page)
* allocated while we're using it * allocated while we're using it
*/ */
static int bitmap_checkpage(struct bitmap *bitmap, unsigned long page, int create) static int bitmap_checkpage(struct bitmap *bitmap, unsigned long page, int create)
__releases(bitmap->lock)
__acquires(bitmap->lock)
{ {
unsigned char *mappage; unsigned char *mappage;
...@@ -325,7 +327,6 @@ static int write_sb_page(struct bitmap *bitmap, struct page *page, int wait) ...@@ -325,7 +327,6 @@ static int write_sb_page(struct bitmap *bitmap, struct page *page, int wait)
return 0; return 0;
bad_alignment: bad_alignment:
rcu_read_unlock();
return -EINVAL; return -EINVAL;
} }
...@@ -1207,6 +1208,8 @@ void bitmap_daemon_work(struct bitmap *bitmap) ...@@ -1207,6 +1208,8 @@ void bitmap_daemon_work(struct bitmap *bitmap)
static bitmap_counter_t *bitmap_get_counter(struct bitmap *bitmap, static bitmap_counter_t *bitmap_get_counter(struct bitmap *bitmap,
sector_t offset, int *blocks, sector_t offset, int *blocks,
int create) int create)
__releases(bitmap->lock)
__acquires(bitmap->lock)
{ {
/* If 'create', we might release the lock and reclaim it. /* If 'create', we might release the lock and reclaim it.
* The lock must have been taken with interrupts enabled. * The lock must have been taken with interrupts enabled.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment