Skip to contentSkip to conversation

make struct def_blk_aops static

PATCH Applied Adrian Bunk 2 participants 2 messages Feb 17, 2008 – Feb 18, 2008 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 make struct def_blk_aops static

This patch makes the needlessly global struct def_blk_aops static.

---

 fs/block_dev.c     |    4 +++-
 include/linux/fs.h |    1 -
 2 files changed, 3 insertions(+), 2 deletions(-)

b6975210aef8e29f8d372ea25e4fd6d1d4749e5d diff --git a/fs/block_dev.c b/fs/block_dev.c index 67fe72c..8335f0e 100644

fs/block_dev.c +3 -1
@@ -31,6 +31,8 @@ struct bdev_inode {
 	struct inode vfs_inode;
 };
 
+static const struct address_space_operations def_blk_aops;
+
 static inline struct bdev_inode *BDEV_I(struct inode *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)
 	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,
 	.writepage	= blkdev_writepage,
 	.sync_page	= block_sync_page,
include/linux/fs.h +0 -1
index 98ffb6e..b84b848 100644
@@ -1590,7 +1590,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 struct block_device *open_by_devnum(dev_t, unsigned);
-extern const struct address_space_operations def_blk_aops;
 #else
 static inline void bd_forget(struct inode *inode) {}
 #endif
Applied
#1 lore raw
Quoted 1 line · Adrian Bunk

This patch makes the needlessly global struct def_blk_aops static.

Applied

Signature · 1 line
Jens Axboe