block: update locking context for blk_free_devt
PATCH 1/1 block: update locking context for blk_free_devt
After 2da78092 this function will not longer sleepy
--- block/genhd.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-)
block/genhd.c +1 -3
@@ -441,12 +441,10 @@ int blk_alloc_devt(struct hd_struct *part, dev_t *devt)* Free @devt which was allocated using blk_alloc_devt(). * * CONTEXT: -* Might sleep. +* Don't care. */ void blk_free_devt (dev_t devt) { -might_sleep (); -if (devt ==MKDEV (0 ,0 ))return ;
Signature · 1 line
1.7.1
Quoted 14 lines · Dmitry Monakhov
After
2da78092this function will not longer sleepySigned-off-by Dmitry Monakhov <[email protected]>--- block/genhd.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-)block/genhd.c +0
-0@@ -441,12 +441,10 @@ int blk_alloc_devt(struct hd_struct *part, dev_t *devt)* Free @devt which was allocated using blk_alloc_devt(). *
block/genhd.c int blk_alloc_devt(struct hd_struct *part, dev_t *devt) · line 449
Quoted 10 lines
block/genhd.c +1
-3* CONTEXT: -* Might sleep. +* Don't care. */ void blk_free_devt (dev_t devt) { -might_sleep (); -if (devt ==MKDEV (0 ,0 ))return ;
What's this against? The might_sleep() was killed about a month ago by commit 46f341ffcfb5. The comment wasn't updated though, it should be.
Signature · 1 line
Jens Axboe
Quoted 20 lines · Jens Axboe
Quoted 19 lines · Dmitry Monakhov
After
2da78092this function will not longer sleepySigned-off-by Dmitry Monakhov <[email protected]>--- block/genhd.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-)block/genhd.c +1
-1@@ -441,12 +441,10 @@ int blk_alloc_devt(struct hd_struct *part, dev_t *devt)* Free @devt which was allocated using blk_alloc_devt(). * * CONTEXT: -* Might sleep. +* Don't care. */ void blk_free_devt (dev_t devt)
Quoted 8 lines
block/genhd.c int blk_alloc_devt(struct hd_struct *part, dev_t *devt) · line 449
Quoted 5 lines
block/genhd.c +0
-2{ -might_sleep (); -if (devt ==MKDEV (0 ,0 ))return ;What's this against? The
might_sleep()was killed about a month ago by commit46f341ffcfb5. The comment wasn't updated though, it should be.
Against 764f612c6c3c23 linux-block/for-next.
I've found this during development other blockdev related feature. can you please point what is your development branch.
Quoted 3 lines
Signature · 2 lines
-- Jens Axboe
Quoted 30 lines · Dmitry Monakhov
Quoted 20 lines · Jens Axboe
Quoted 19 lines · Dmitry Monakhov
After
2da78092this function will not longer sleepySigned-off-by Dmitry Monakhov <[email protected]>--- block/genhd.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-)block/genhd.c +1
-1@@ -441,12 +441,10 @@ int blk_alloc_devt(struct hd_struct *part, dev_t *devt)* Free @devt which was allocated using blk_alloc_devt(). * * CONTEXT: -* Might sleep. +* Don't care. */ void blk_free_devt (dev_t devt)Quoted 8 lines
block/genhd.c int blk_alloc_devt(struct hd_struct *part, dev_t *devt) · line 449
Quoted 5 lines
block/genhd.c +0
-2{ -might_sleep (); -if (devt ==MKDEV (0 ,0 ))return ;What's this against? The
might_sleep()was killed about a month ago by commit46f341ffcfb5. The comment wasn't updated though, it should be.
Quoted 3 lines
Against
764f612c6c3c23linux-block/for-next.
I've found this during development other blockdev related feature. can you please point what is your development branch.
Ah, I see. The devel branches are always for-3.x/core and for-3.x/drivers, so right now the current ones are for-3.18/core and so forth. That fix went into master, and I generally don't pull into the devel branches unless I really have to. This particular one should probably have gone in, since it spews a warning. Generally I expect people running them to use for-next, which really should be merged with master. I will just pull it in. for-next can and will be rebased sometimes though, only the real devel branches are more or less set in stone when it comes to history. So for development purposes, those should be used and not for-next.
Signature · 1 line
Jens Axboe