Skip to contentSkip to conversation

don't export blkdev_open and def_blk_ops

PATCH New Christoph Hellwig 1 participant 1 message Sep 7, 2004 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 don't export blkdev_open and def_blk_ops

Already since 2.4 all block devices use block_device_operations and shouldn't deal with file operations directly.

fs/block_dev.c +1 -5
@@ -666,7 +666,7 @@
 
 EXPORT_SYMBOL(blkdev_get);
 
-int blkdev_open(struct inode * inode, struct file * filp)
+static int blkdev_open(struct inode * inode, struct file * filp)
 {
 	struct block_device *bdev;
 	int res;
@@ -695,8 +695,6 @@
 	return res;
 }
 
-EXPORT_SYMBOL(blkdev_open);
-
 int blkdev_put(struct block_device *bdev)
 {
 	int ret = 0;
@@ -797,8 +795,6 @@
 	.writev		= generic_file_write_nolock,
 	.sendfile	= generic_file_sendfile,
 };
-
-EXPORT_SYMBOL(def_blk_fops);
 
 int ioctl_by_bdev(struct block_device *bdev, unsigned cmd, unsigned long arg)
 {
include/linux/fs.h +0 -1
@@ -1251,7 +1251,6 @@
 extern void bd_set_size(struct block_device *, loff_t size);
 extern void bd_forget(struct inode *inode);
 extern void bdput(struct block_device *);
-extern int blkdev_open(struct inode *, struct file *);
 extern struct block_device *open_by_devnum(dev_t, unsigned);
 extern struct file_operations def_blk_fops;
 extern struct address_space_operations def_blk_aops;