提交 4c54ac62 编写于 作者: A Adrian Bunk 提交者: Jens Axboe

make struct def_blk_aops static

This patch makes the needlessly global struct def_blk_aops static.
Signed-off-by: NAdrian Bunk <bunk@kernel.org>
Signed-off-by: NJens Axboe <axboe@carl.home.kernel.dk>
上级 52ff4cae
...@@ -31,6 +31,8 @@ struct bdev_inode { ...@@ -31,6 +31,8 @@ struct bdev_inode {
struct inode vfs_inode; struct inode vfs_inode;
}; };
static const struct address_space_operations def_blk_aops;
static inline struct bdev_inode *BDEV_I(struct inode *inode) static inline struct bdev_inode *BDEV_I(struct inode *inode)
{ {
return container_of(inode, struct bdev_inode, vfs_inode); return container_of(inode, struct bdev_inode, vfs_inode);
...@@ -1334,7 +1336,7 @@ static long block_ioctl(struct file *file, unsigned cmd, unsigned long arg) ...@@ -1334,7 +1336,7 @@ static long block_ioctl(struct file *file, unsigned cmd, unsigned long arg)
return blkdev_ioctl(file->f_mapping->host, file, cmd, arg); return blkdev_ioctl(file->f_mapping->host, file, cmd, arg);
} }
const struct address_space_operations def_blk_aops = { static const struct address_space_operations def_blk_aops = {
.readpage = blkdev_readpage, .readpage = blkdev_readpage,
.writepage = blkdev_writepage, .writepage = blkdev_writepage,
.sync_page = block_sync_page, .sync_page = block_sync_page,
......
...@@ -1590,7 +1590,6 @@ extern void bd_set_size(struct block_device *, loff_t size); ...@@ -1590,7 +1590,6 @@ extern void bd_set_size(struct block_device *, loff_t size);
extern void bd_forget(struct inode *inode); extern void bd_forget(struct inode *inode);
extern void bdput(struct block_device *); extern void bdput(struct block_device *);
extern struct block_device *open_by_devnum(dev_t, unsigned); extern struct block_device *open_by_devnum(dev_t, unsigned);
extern const struct address_space_operations def_blk_aops;
#else #else
static inline void bd_forget(struct inode *inode) {} static inline void bd_forget(struct inode *inode) {}
#endif #endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册