summaryrefslogtreecommitdiff
path: root/fs/kernfs/inode.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2015-01-14 12:42:30 +0300
committerJens Axboe <axboe@fb.com>2015-01-21 00:02:54 +0300
commita7a2c680a2ad81b3181a335ee76e23d5195007ee (patch)
tree6755c100ab14f95ab78eba709f2de737b16e3d02 /fs/kernfs/inode.c
parentec6f34e5b552fb0a52e6aae1a5afbbb1605cc6cc (diff)
downloadlinux-a7a2c680a2ad81b3181a335ee76e23d5195007ee.tar.xz
fs: deduplicate noop_backing_dev_info
hugetlbfs, kernfs and dlmfs can simply use noop_backing_dev_info instead of creating a local duplicate. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Jan Kara <jack@suse.cz> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'fs/kernfs/inode.c')
-rw-r--r--fs/kernfs/inode.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/fs/kernfs/inode.c b/fs/kernfs/inode.c
index 985217626e66..06f06887b2d2 100644
--- a/fs/kernfs/inode.c
+++ b/fs/kernfs/inode.c
@@ -24,12 +24,6 @@ static const struct address_space_operations kernfs_aops = {
.write_end = simple_write_end,
};
-static struct backing_dev_info kernfs_bdi = {
- .name = "kernfs",
- .ra_pages = 0, /* No readahead */
- .capabilities = BDI_CAP_NO_ACCT_AND_WRITEBACK,
-};
-
static const struct inode_operations kernfs_iops = {
.permission = kernfs_iop_permission,
.setattr = kernfs_iop_setattr,
@@ -40,12 +34,6 @@ static const struct inode_operations kernfs_iops = {
.listxattr = kernfs_iop_listxattr,
};
-void __init kernfs_inode_init(void)
-{
- if (bdi_init(&kernfs_bdi))
- panic("failed to init kernfs_bdi");
-}
-
static struct kernfs_iattrs *kernfs_iattrs(struct kernfs_node *kn)
{
static DEFINE_MUTEX(iattr_mutex);
@@ -298,7 +286,7 @@ static void kernfs_init_inode(struct kernfs_node *kn, struct inode *inode)
kernfs_get(kn);
inode->i_private = kn;
inode->i_mapping->a_ops = &kernfs_aops;
- inode->i_mapping->backing_dev_info = &kernfs_bdi;
+ inode->i_mapping->backing_dev_info = &noop_backing_dev_info;
inode->i_op = &kernfs_iops;
set_default_inode_attr(inode, kn->mode);