OSDN Git Service

md: add __acquires/__releases annotations to handle_active_stripes
authorChristoph Hellwig <hch@lst.de>
Thu, 4 Apr 2019 16:56:16 +0000 (18:56 +0200)
committerSong Liu <songliubraving@fb.com>
Wed, 10 Apr 2019 22:26:09 +0000 (15:26 -0700)
This tells sparse that we release and reacquire the device_lock and
avoids a warning.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Song Liu <songliubraving@fb.com>
drivers/md/raid5.c

index d794d87..2b0a715 100644 (file)
@@ -6159,6 +6159,8 @@ static int  retry_aligned_read(struct r5conf *conf, struct bio *raid_bio,
 static int handle_active_stripes(struct r5conf *conf, int group,
                                 struct r5worker *worker,
                                 struct list_head *temp_inactive_list)
+               __releases(&conf->device_lock)
+               __acquires(&conf->device_lock)
 {
        struct stripe_head *batch[MAX_STRIPE_BATCH], *sh;
        int i, batch_size = 0, hash;