diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2015-02-20 14:54:53 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2015-02-20 14:54:53 -0500 |
commit | 4c971aa78314253cce914ed29e3d90df3326d646 (patch) | |
tree | a9dcf0b1fdc9e1aacff90afb5b3ab79983115dcc /drivers/md/bitmap.c | |
parent | 4ba24fef3eb3b142197135223b90ced2f319cd53 (diff) | |
parent | 290b799c390d77d27effee3ce312203aaa32ee74 (diff) |
Merge branch 'next' into for-linus
Second round of updates for 3.20.
Diffstat (limited to 'drivers/md/bitmap.c')
-rw-r--r-- | drivers/md/bitmap.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c index da3604e73e8a..1695ee5f3ffc 100644 --- a/drivers/md/bitmap.c +++ b/drivers/md/bitmap.c | |||
@@ -72,6 +72,19 @@ __acquires(bitmap->lock) | |||
72 | /* this page has not been allocated yet */ | 72 | /* this page has not been allocated yet */ |
73 | 73 | ||
74 | spin_unlock_irq(&bitmap->lock); | 74 | spin_unlock_irq(&bitmap->lock); |
75 | /* It is possible that this is being called inside a | ||
76 | * prepare_to_wait/finish_wait loop from raid5c:make_request(). | ||
77 | * In general it is not permitted to sleep in that context as it | ||
78 | * can cause the loop to spin freely. | ||
79 | * That doesn't apply here as we can only reach this point | ||
80 | * once with any loop. | ||
81 | * When this function completes, either bp[page].map or | ||
82 | * bp[page].hijacked. In either case, this function will | ||
83 | * abort before getting to this point again. So there is | ||
84 | * no risk of a free-spin, and so it is safe to assert | ||
85 | * that sleeping here is allowed. | ||
86 | */ | ||
87 | sched_annotate_sleep(); | ||
75 | mappage = kzalloc(PAGE_SIZE, GFP_NOIO); | 88 | mappage = kzalloc(PAGE_SIZE, GFP_NOIO); |
76 | spin_lock_irq(&bitmap->lock); | 89 | spin_lock_irq(&bitmap->lock); |
77 | 90 | ||