projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e546fe1
)
block: Error an attempt to split an atomic write in bio_split()
author
John Garry
<john.g.garry@oracle.com>
Mon, 11 Nov 2024 11:21:46 +0000
(11:21 +0000)
committer
Jens Axboe
<axboe@kernel.dk>
Mon, 11 Nov 2024 15:35:46 +0000
(08:35 -0700)
This is disallowed.
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: John Garry <john.g.garry@oracle.com>
Link:
https://lore.kernel.org/r/20241111112150.3756529-3-john.g.garry@oracle.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bio.c
patch
|
blob
|
history
diff --git
a/block/bio.c
b/block/bio.c
index
948b228
..
699a78c
100644
(file)
--- a/
block/bio.c
+++ b/
block/bio.c
@@
-1674,6
+1674,10
@@
struct bio *bio_split(struct bio *bio, int sectors,
if (WARN_ON_ONCE(bio_op(bio) == REQ_OP_ZONE_APPEND))
return ERR_PTR(-EINVAL);
+ /* atomic writes cannot be split */
+ if (bio->bi_opf & REQ_ATOMIC)
+ return ERR_PTR(-EINVAL);
+
split = bio_alloc_clone(bio->bi_bdev, bio, gfp, bs);
if (!split)
return ERR_PTR(-ENOMEM);