Skip to contentSkip to conversation

bcache: Fixed incorrect order of arguments to bio_alloc_bioset()

PATCH In review Kent Overstreet 3 participants 3 messages Oct 22, 2013 – Oct 24, 2013 1 message not in the archive bcache (block layer cache)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bcache: Fixed incorrect order of arguments to bio_alloc_bioset()

Cc linux-stable <[email protected]> # >= v3.10
---
 drivers/md/bcache/request.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/md/bcache/request.c +1 -1
index b6a74bc..2a7f0dd 100644
@@ -1000,7 +1000,7 @@ static void request_write(struct cached_dev *dc, struct search *s)
 
 		if (bio->bi_rw & REQ_FLUSH) {
 			/* Also need to send a flush to the backing device */
-			struct bio *flush = bio_alloc_bioset(0, GFP_NOIO,
+			struct bio *flush = bio_alloc_bioset(GFP_NOIO, 0,
 							     dc->disk.bio_split);
 
 			flush->bi_rw	= WRITE_FLUSH;
Signature · 1 line
1.8.4.rc3

A message that is not in the archive (sent off-list or not yet received): 1382481353-4300-1-git-send-email-kmo-PEzghdH756F8UrSeD/[email protected]

#2 lore raw

Does this can crash or destroy data? Does i need more speed to apply it to my own kernel or i can wait?
Thanks!

2013/10/23 Kent Overstreet <kmo-PEzghdH756F8UrSeD/[email protected]>:

Quoted 26 lines
---
 drivers/md/bcache/request.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/md/bcache/request.c +1 -2
index b6a74bc..2a7f0dd 100644
@@ -1000,7 +1000,7 @@ static void request_write(struct cached_dev *dc, struct search *s)
 
                if (bio->bi_rw & REQ_FLUSH) {
                        /* Also need to send a flush to the backing device */
-                       struct bio *flush = bio_alloc_bioset(0, GFP_NOIO,
+                       struct bio *flush = bio_alloc_bioset(GFP_NOIO, 0,
                                                             dc->disk.bio_split);
 
                        flush->bi_rw    = WRITE_FLUSH;
--

1.8.4.rc3

--
To unsubscribe from this list: send the line "unsubscribe linux-bcache" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 3 lines
Vasiliy Tolstov,
e-mail: [email protected]
jabber: [email protected]
#3 lore raw
In reply to Kent Overstreet
Quoted 11 lines · Kent Overstreet
---
 drivers/md/bcache/request.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/md/bcache/request.c +0 -0
index b6a74bc..2a7f0dd 100644

drivers/md/bcache/request.c static void request_write(struct cached_dev *dc, struct search *s) · line 1006

Quoted 8 lines
drivers/md/bcache/request.c +1 -1
@@ -1000,7 +1000,7 @@ static void request_write(struct cached_dev *dc, struct search *s)
 
 		if (bio->bi_rw & REQ_FLUSH) {
 			/* Also need to send a flush to the backing device */
-			struct bio *flush = bio_alloc_bioset(0, GFP_NOIO,
+			struct bio *flush = bio_alloc_bioset(GFP_NOIO, 0,
 							     dc->disk.bio_split);
 
 			flush->bi_rw	= WRITE_FLUSH;

Woops... Added.

Signature · 1 line
Jens Axboe