[RH6] added export for part_nr_sects_read()

Submitted by Vasily Averin on Dec. 11, 2018, 9:30 a.m.


Message ID 2fa2e269-c689-bd20-eebe-d61a93c15531@virtuozzo.com
State New
Series "added export for part_nr_sects_read()"
Headers show

Commit Message

Vasily Averin Dec. 11, 2018, 9:30 a.m.
part_nr_sects_read() was backported incorrectly,
in mainline it is inline function defined in linux/genhd.h
It is visible outside and can be used in modules.
In our rhel6-based kernel it is an internal function
but its declaration is still present in linux/genhd.h.
This breaks compilation of affected modules 
because they cannot access declared function.

thsi patch adds export for part_nr_sects_read()
that fixes broken compilation of affected modules


Signed-off-by: Vasily Averin <vvs@virtuozzo.com>

Patch hide | download patch | download mbox

diff --git a/fs/partitions/check.c b/fs/partitions/check.c
index 4907ae4d70d..eda3f3e6372 100644
--- a/fs/partitions/check.c
+++ b/fs/partitions/check.c
@@ -420,6 +420,7 @@  sector_t part_nr_sects_read(struct hd_struct *part)
 	return part->nr_sects;
 static ssize_t whole_disk_show(struct device *dev,
 			       struct device_attribute *attr, char *buf)