[Devel] [PATCH RH6] added export for part_nr_sects_read()

Vasily Averin vvs at virtuozzo.com
Tue Dec 11 12:30:48 MSK 2018


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

https://bugs.openvz.org/browse/OVZ-7071

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

-------------- next part --------------
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;
 }
 #endif
+EXPORT_SYMBOL(part_nr_sects_read);
 
 static ssize_t whole_disk_show(struct device *dev,
 			       struct device_attribute *attr, char *buf)


More information about the Devel mailing list