projects
/
platform
/
kernel
/
linux-starfive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
netfilter: nft_set_rbtree: skip end interval element from gc
[platform/kernel/linux-starfive.git]
/
block
/
partitions
/
core.c
diff --git
a/block/partitions/core.c
b/block/partitions/core.c
index
e137a87
..
e58c8b5
100644
(file)
--- a/
block/partitions/core.c
+++ b/
block/partitions/core.c
@@
-458,6
+458,11
@@
int bdev_add_partition(struct gendisk *disk, int partno, sector_t start,
goto out;
}
+ if (disk->flags & GENHD_FL_NO_PART) {
+ ret = -EINVAL;
+ goto out;
+ }
+
if (partition_overlaps(disk, start, length, -1)) {
ret = -EBUSY;
goto out;