diff options
author | NeilBrown <neilb@suse.de> | 2009-09-23 18:06:44 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2009-09-23 18:06:44 +1000 |
commit | ee305acef5c7841dc25cc32e84bb94f744e1e9b9 (patch) | |
tree | f952a19fce593391e5cbd4a3bb4087d214a8ddc0 /drivers | |
parent | a9f326ebf22a0de776815240fb76dabe139397ea (diff) | |
download | op-kernel-dev-ee305acef5c7841dc25cc32e84bb94f744e1e9b9.zip op-kernel-dev-ee305acef5c7841dc25cc32e84bb94f744e1e9b9.tar.gz |
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: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/md/bitmap.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c index 3319c2f..6986b00 100644 --- a/drivers/md/bitmap.c +++ b/drivers/md/bitmap.c @@ -108,6 +108,8 @@ static void bitmap_free_page(struct bitmap *bitmap, unsigned char *page) * allocated while we're using it */ static int bitmap_checkpage(struct bitmap *bitmap, unsigned long page, int create) +__releases(bitmap->lock) +__acquires(bitmap->lock) { unsigned char *mappage; @@ -325,7 +327,6 @@ static int write_sb_page(struct bitmap *bitmap, struct page *page, int wait) return 0; bad_alignment: - rcu_read_unlock(); return -EINVAL; } @@ -1207,6 +1208,8 @@ void bitmap_daemon_work(struct bitmap *bitmap) static bitmap_counter_t *bitmap_get_counter(struct bitmap *bitmap, sector_t offset, int *blocks, int create) +__releases(bitmap->lock) +__acquires(bitmap->lock) { /* If 'create', we might release the lock and reclaim it. * The lock must have been taken with interrupts enabled. |