fs: remove mapping->backing_dev_info
authorChristoph Hellwig <hch@lst.de>
Wed, 14 Jan 2015 09:42:37 +0000 (10:42 +0100)
committerJens Axboe <axboe@fb.com>
Tue, 20 Jan 2015 21:03:05 +0000 (14:03 -0700)
Now that we never use the backing_dev_info pointer in struct address_space
we can simply remove it and save 4 to 8 bytes in every inode.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Reviewed-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jens Axboe <axboe@fb.com>
32 files changed:
drivers/char/raw.c
fs/aio.c
fs/block_dev.c
fs/btrfs/disk-io.c
fs/btrfs/inode.c
fs/ceph/inode.c
fs/cifs/inode.c
fs/configfs/inode.c
fs/ecryptfs/inode.c
fs/exofs/inode.c
fs/fuse/inode.c
fs/gfs2/glock.c
fs/gfs2/ops_fstype.c
fs/hugetlbfs/inode.c
fs/inode.c
fs/kernfs/inode.c
fs/ncpfs/inode.c
fs/nfs/inode.c
fs/nilfs2/gcinode.c
fs/nilfs2/mdt.c
fs/nilfs2/page.c
fs/nilfs2/page.h
fs/nilfs2/super.c
fs/ocfs2/dlmfs/dlmfs.c
fs/ramfs/inode.c
fs/romfs/super.c
fs/ubifs/dir.c
fs/ubifs/super.c
include/linux/fs.h
mm/backing-dev.c
mm/shmem.c
mm/swap_state.c

index a24891b97547dcf87cb91b52401e63f4d9dc50a2..6e29bf2db5367732eaf68f05d1c75dd22adf7966 100644 (file)
@@ -104,11 +104,9 @@ static int raw_release(struct inode *inode, struct file *filp)
 
        mutex_lock(&raw_mutex);
        bdev = raw_devices[minor].binding;
-       if (--raw_devices[minor].inuse == 0) {
+       if (--raw_devices[minor].inuse == 0)
                /* Here  inode->i_mapping == bdev->bd_inode->i_mapping  */
                inode->i_mapping = &inode->i_data;
-               inode->i_mapping->backing_dev_info = &default_backing_dev_info;
-       }
        mutex_unlock(&raw_mutex);
 
        blkdev_put(bdev, filp->f_mode | FMODE_EXCL);
index 6f13d3fab07f1a0fc003af156b3df658571e10ff..3bf8b1d250c3483ad418a00b9bea052cdc810366 100644 (file)
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -176,7 +176,6 @@ static struct file *aio_private_file(struct kioctx *ctx, loff_t nr_pages)
 
        inode->i_mapping->a_ops = &aio_ctx_aops;
        inode->i_mapping->private_data = ctx;
-       inode->i_mapping->backing_dev_info = &noop_backing_dev_info;
        inode->i_size = PAGE_SIZE * nr_pages;
 
        path.dentry = d_alloc_pseudo(aio_mnt->mnt_sb, &this);
index 026ca7b8431c7e295a6f54e95d5448daed99248a..a9f92794d7a09e3d0e937b7910c45007bd767c2d 100644 (file)
@@ -60,19 +60,6 @@ static void bdev_write_inode(struct inode *inode)
        spin_unlock(&inode->i_lock);
 }
 
-/*
- * Move the inode from its current bdi to a new bdi.  Make sure the inode
- * is clean before moving so that it doesn't linger on the old bdi.
- */
-static void bdev_inode_switch_bdi(struct inode *inode,
-                       struct backing_dev_info *dst)
-{
-       spin_lock(&inode->i_lock);
-       WARN_ON_ONCE(inode->i_state & I_DIRTY);
-       inode->i_data.backing_dev_info = dst;
-       spin_unlock(&inode->i_lock);
-}
-
 /* Kill _all_ buffers and pagecache , dirty or not.. */
 void kill_bdev(struct block_device *bdev)
 {
@@ -589,7 +576,6 @@ struct block_device *bdget(dev_t dev)
                inode->i_bdev = bdev;
                inode->i_data.a_ops = &def_blk_aops;
                mapping_set_gfp_mask(&inode->i_data, GFP_USER);
-               inode->i_data.backing_dev_info = &default_backing_dev_info;
                spin_lock(&bdev_lock);
                list_add(&bdev->bd_list, &all_bdevs);
                spin_unlock(&bdev_lock);
@@ -1150,8 +1136,6 @@ static int __blkdev_get(struct block_device *bdev, fmode_t mode, int for_part)
                bdev->bd_queue = disk->queue;
                bdev->bd_contains = bdev;
                if (!partno) {
-                       struct backing_dev_info *bdi;
-
                        ret = -ENXIO;
                        bdev->bd_part = disk_get_part(disk, partno);
                        if (!bdev->bd_part)
@@ -1177,11 +1161,8 @@ static int __blkdev_get(struct block_device *bdev, fmode_t mode, int for_part)
                                }
                        }
 
-                       if (!ret) {
+                       if (!ret)
                                bd_set_size(bdev,(loff_t)get_capacity(disk)<<9);
-                               bdi = blk_get_backing_dev_info(bdev);
-                               bdev_inode_switch_bdi(bdev->bd_inode, bdi);
-                       }
 
                        /*
                         * If the device is invalidated, rescan partition
@@ -1208,8 +1189,6 @@ static int __blkdev_get(struct block_device *bdev, fmode_t mode, int for_part)
                        if (ret)
                                goto out_clear;
                        bdev->bd_contains = whole;
-                       bdev_inode_switch_bdi(bdev->bd_inode,
-                               whole->bd_inode->i_data.backing_dev_info);
                        bdev->bd_part = disk_get_part(disk, partno);
                        if (!(disk->flags & GENHD_FL_UP) ||
                            !bdev->bd_part || !bdev->bd_part->nr_sects) {
@@ -1249,7 +1228,6 @@ static int __blkdev_get(struct block_device *bdev, fmode_t mode, int for_part)
        bdev->bd_disk = NULL;
        bdev->bd_part = NULL;
        bdev->bd_queue = NULL;
-       bdev_inode_switch_bdi(bdev->bd_inode, &default_backing_dev_info);
        if (bdev != bdev->bd_contains)
                __blkdev_put(bdev->bd_contains, mode, 1);
        bdev->bd_contains = NULL;
@@ -1474,8 +1452,6 @@ static void __blkdev_put(struct block_device *bdev, fmode_t mode, int for_part)
                 * dirty data before.
                 */
                bdev_write_inode(bdev->bd_inode);
-               bdev_inode_switch_bdi(bdev->bd_inode,
-                                       &default_backing_dev_info);
        }
        if (bdev->bd_contains == bdev) {
                if (disk->fops->release)
index afc4092989cd4f936a5c18668680c34362cb3f72..1ec872e3a9265ff4dd5020dfbe686dd870ae8a3b 100644 (file)
@@ -2318,7 +2318,6 @@ int open_ctree(struct super_block *sb,
         */
        fs_info->btree_inode->i_size = OFFSET_MAX;
        fs_info->btree_inode->i_mapping->a_ops = &btree_aops;
-       fs_info->btree_inode->i_mapping->backing_dev_info = &fs_info->bdi;
 
        RB_CLEAR_NODE(&BTRFS_I(fs_info->btree_inode)->rb_node);
        extent_io_tree_init(&BTRFS_I(fs_info->btree_inode)->io_tree,
index 8bf326affb944026a43bbc42a900d6f8355ce837..54bcf639d1cf1f48df951477b16e6266402f7bc6 100644 (file)
@@ -3608,7 +3608,6 @@ cache_acl:
        switch (inode->i_mode & S_IFMT) {
        case S_IFREG:
                inode->i_mapping->a_ops = &btrfs_aops;
-               inode->i_mapping->backing_dev_info = &root->fs_info->bdi;
                BTRFS_I(inode)->io_tree.ops = &btrfs_extent_io_ops;
                inode->i_fop = &btrfs_file_operations;
                inode->i_op = &btrfs_file_inode_operations;
@@ -3623,7 +3622,6 @@ cache_acl:
        case S_IFLNK:
                inode->i_op = &btrfs_symlink_inode_operations;
                inode->i_mapping->a_ops = &btrfs_symlink_aops;
-               inode->i_mapping->backing_dev_info = &root->fs_info->bdi;
                break;
        default:
                inode->i_op = &btrfs_special_inode_operations;
@@ -6088,7 +6086,6 @@ static int btrfs_create(struct inode *dir, struct dentry *dentry,
        inode->i_fop = &btrfs_file_operations;
        inode->i_op = &btrfs_file_inode_operations;
        inode->i_mapping->a_ops = &btrfs_aops;
-       inode->i_mapping->backing_dev_info = &root->fs_info->bdi;
 
        err = btrfs_init_inode_security(trans, inode, dir, &dentry->d_name);
        if (err)
@@ -9203,7 +9200,6 @@ static int btrfs_symlink(struct inode *dir, struct dentry *dentry,
        inode->i_fop = &btrfs_file_operations;
        inode->i_op = &btrfs_file_inode_operations;
        inode->i_mapping->a_ops = &btrfs_aops;
-       inode->i_mapping->backing_dev_info = &root->fs_info->bdi;
        BTRFS_I(inode)->io_tree.ops = &btrfs_extent_io_ops;
 
        err = btrfs_init_inode_security(trans, inode, dir, &dentry->d_name);
@@ -9247,7 +9243,6 @@ static int btrfs_symlink(struct inode *dir, struct dentry *dentry,
 
        inode->i_op = &btrfs_symlink_inode_operations;
        inode->i_mapping->a_ops = &btrfs_symlink_aops;
-       inode->i_mapping->backing_dev_info = &root->fs_info->bdi;
        inode_set_bytes(inode, name_len);
        btrfs_i_size_write(inode, name_len);
        err = btrfs_update_inode(trans, root, inode);
@@ -9459,7 +9454,6 @@ static int btrfs_tmpfile(struct inode *dir, struct dentry *dentry, umode_t mode)
        inode->i_op = &btrfs_file_inode_operations;
 
        inode->i_mapping->a_ops = &btrfs_aops;
-       inode->i_mapping->backing_dev_info = &root->fs_info->bdi;
        BTRFS_I(inode)->io_tree.ops = &btrfs_extent_io_ops;
 
        ret = btrfs_init_inode_security(trans, inode, dir, NULL);
index f61a74115bebbe0c48f2b8d3edb7e85ff39d197f..6b51736051541ea54b6956cf6dce57576f8ffe6f 100644 (file)
@@ -783,8 +783,6 @@ static int fill_inode(struct inode *inode, struct page *locked_page,
        }
 
        inode->i_mapping->a_ops = &ceph_aops;
-       inode->i_mapping->backing_dev_info =
-               &ceph_sb_to_client(inode->i_sb)->backing_dev_info;
 
        switch (inode->i_mode & S_IFMT) {
        case S_IFIFO:
index 0c3ce464cae4697e0a2652fa35f6647ce26c3f50..2d4f37235ed0fa360782ae237c89fccccbf8b719 100644 (file)
@@ -937,8 +937,6 @@ retry_iget5_locked:
                        inode->i_flags |= S_NOATIME | S_NOCMTIME;
                if (inode->i_state & I_NEW) {
                        inode->i_ino = hash;
-                       if (S_ISREG(inode->i_mode))
-                               inode->i_data.backing_dev_info = sb->s_bdi;
 #ifdef CONFIG_CIFS_FSCACHE
                        /* initialize per-inode cache cookie pointer */
                        CIFS_I(inode)->fscache = NULL;
index 0ad6b4d6de00125b0222c81a33de720271fc504b..65af861471541924525bcd9c04ab32a931296ba8 100644 (file)
@@ -131,7 +131,6 @@ struct inode *configfs_new_inode(umode_t mode, struct configfs_dirent *sd,
        if (inode) {
                inode->i_ino = get_next_ino();
                inode->i_mapping->a_ops = &configfs_aops;
-               inode->i_mapping->backing_dev_info = &noop_backing_dev_info;
                inode->i_op = &configfs_inode_operations;
 
                if (sd->s_iattr) {
index 1686dc2da9fd7627df7fea9035262ca900b5676e..34b36a5040593e960ff3da4fdc20dcaa5c5cb8f6 100644 (file)
@@ -67,7 +67,6 @@ static int ecryptfs_inode_set(struct inode *inode, void *opaque)
        inode->i_ino = lower_inode->i_ino;
        inode->i_version++;
        inode->i_mapping->a_ops = &ecryptfs_aops;
-       inode->i_mapping->backing_dev_info = inode->i_sb->s_bdi;
 
        if (S_ISLNK(inode->i_mode))
                inode->i_op = &ecryptfs_symlink_iops;
index f1d3d4eb8c4ff1fe24d17ba9431abffada04bacc..6fc91df99ff8aa0957860b268d732bc3a0d86fe4 100644 (file)
@@ -1214,7 +1214,6 @@ struct inode *exofs_iget(struct super_block *sb, unsigned long ino)
                memcpy(oi->i_data, fcb.i_data, sizeof(fcb.i_data));
        }
 
-       inode->i_mapping->backing_dev_info = sb->s_bdi;
        if (S_ISREG(inode->i_mode)) {
                inode->i_op = &exofs_file_inode_operations;
                inode->i_fop = &exofs_file_operations;
@@ -1314,7 +1313,6 @@ struct inode *exofs_new_inode(struct inode *dir, umode_t mode)
 
        set_obj_2bcreated(oi);
 
-       inode->i_mapping->backing_dev_info = sb->s_bdi;
        inode_init_owner(inode, dir, mode);
        inode->i_ino = sbi->s_nextid++;
        inode->i_blkbits = EXOFS_BLKSHIFT;
index f38256e4476ed2a9101480342bcd0fd90a99fd38..e8799c11424b93f0581497c5774db2122780b40b 100644 (file)
@@ -308,7 +308,6 @@ struct inode *fuse_iget(struct super_block *sb, u64 nodeid,
                if (!fc->writeback_cache || !S_ISREG(attr->mode))
                        inode->i_flags |= S_NOCMTIME;
                inode->i_generation = generation;
-               inode->i_data.backing_dev_info = &fc->bdi;
                fuse_init_inode(inode, attr);
                unlock_new_inode(inode);
        } else if ((inode->i_mode ^ attr->mode) & S_IFMT) {
index a23524aa3eac34a33902e0a9bd1304936d7017fc..08ea717981f788f7422e3b71e81eec45f6247825 100644 (file)
@@ -775,7 +775,6 @@ int gfs2_glock_get(struct gfs2_sbd *sdp, u64 number,
                mapping->flags = 0;
                mapping_set_gfp_mask(mapping, GFP_NOFS);
                mapping->private_data = NULL;
-               mapping->backing_dev_info = s->s_bdi;
                mapping->writeback_index = 0;
        }
 
index 8633ad328ee2a3c32fe61cc57428418008b05374..efc8e254787cb3ca61b059cc1e35ce5f494d2641 100644 (file)
@@ -112,7 +112,6 @@ static struct gfs2_sbd *init_sbd(struct super_block *sb)
        mapping->flags = 0;
        mapping_set_gfp_mask(mapping, GFP_NOFS);
        mapping->private_data = NULL;
-       mapping->backing_dev_info = sb->s_bdi;
        mapping->writeback_index = 0;
 
        spin_lock_init(&sdp->sd_log_lock);
index de7c95c7d8409f97dd7187ae1a9e7d96ce15be2f..c274aca8e8dc231cb4473b964bc3315058910968 100644 (file)
@@ -492,7 +492,6 @@ static struct inode *hugetlbfs_get_inode(struct super_block *sb,
                lockdep_set_class(&inode->i_mapping->i_mmap_rwsem,
                                &hugetlbfs_i_mmap_rwsem_key);
                inode->i_mapping->a_ops = &hugetlbfs_aops;
-               inode->i_mapping->backing_dev_info = &noop_backing_dev_info;
                inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
                inode->i_mapping->private_data = resv_map;
                info = HUGETLBFS_I(inode);
index aa149e7262acffff13db5707eeb0c0144add985c..e4e8caa7464cc78b5d0d5b97a2198edbd8a97470 100644 (file)
@@ -170,20 +170,7 @@ int inode_init_always(struct super_block *sb, struct inode *inode)
        atomic_set(&mapping->i_mmap_writable, 0);
        mapping_set_gfp_mask(mapping, GFP_HIGHUSER_MOVABLE);
        mapping->private_data = NULL;
-       mapping->backing_dev_info = &default_backing_dev_info;
        mapping->writeback_index = 0;
-
-       /*
-        * If the block_device provides a backing_dev_info for client
-        * inodes then use that.  Otherwise the inode share the bdev's
-        * backing_dev_info.
-        */
-       if (sb->s_bdev) {
-               struct backing_dev_info *bdi;
-
-               bdi = sb->s_bdev->bd_inode->i_mapping->backing_dev_info;
-               mapping->backing_dev_info = bdi;
-       }
        inode->i_private = NULL;
        inode->i_mapping = mapping;
        INIT_HLIST_HEAD(&inode->i_dentry);      /* buggered by rcu freeing */
index 06f06887b2d2d2cb39e07f876f991c341e8a4d90..9000874a945b62bf4f4fded166133d5f90159823 100644 (file)
@@ -286,7 +286,6 @@ 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 = &noop_backing_dev_info;
        inode->i_op = &kernfs_iops;
 
        set_default_inode_attr(inode, kn->mode);
index a699a3fc62c07ac248b1988b3ed3228fc938ec0b..01a9e16e97825eb67a7c761c6b7cc969bd8077d0 100644 (file)
@@ -267,7 +267,6 @@ ncp_iget(struct super_block *sb, struct ncp_entry_info *info)
        if (inode) {
                atomic_set(&NCP_FINFO(inode)->opened, info->opened);
 
-               inode->i_mapping->backing_dev_info = sb->s_bdi;
                inode->i_ino = info->ino;
                ncp_set_attr(inode, info);
                if (S_ISREG(inode->i_mode)) {
index 4bffe637ea3255fd2e1e6812556e3907791f4152..24aac72420f4d4db2cffe55650b5d9621a1f52ee 100644 (file)
@@ -387,7 +387,6 @@ nfs_fhget(struct super_block *sb, struct nfs_fh *fh, struct nfs_fattr *fattr, st
                if (S_ISREG(inode->i_mode)) {
                        inode->i_fop = NFS_SB(sb)->nfs_client->rpc_ops->file_ops;
                        inode->i_data.a_ops = &nfs_file_aops;
-                       inode->i_data.backing_dev_info = &NFS_SB(sb)->backing_dev_info;
                } else if (S_ISDIR(inode->i_mode)) {
                        inode->i_op = NFS_SB(sb)->nfs_client->rpc_ops->dir_inode_ops;
                        inode->i_fop = &nfs_dir_operations;
index 57ceaf33d1773e6e1d2c7be8051b74795d663110..748ca238915a434750f223dc2a6417d80a40e17f 100644 (file)
@@ -172,7 +172,6 @@ int nilfs_init_gcinode(struct inode *inode)
        inode->i_mode = S_IFREG;
        mapping_set_gfp_mask(inode->i_mapping, GFP_NOFS);
        inode->i_mapping->a_ops = &empty_aops;
-       inode->i_mapping->backing_dev_info = inode->i_sb->s_bdi;
 
        ii->i_flags = 0;
        nilfs_bmap_init_gc(ii->i_bmap);
index c4dcd1db57ee9c7e158479416dd1c80a67c834cf..892cf5ffdb8e165a373ae6e44036ef58ee1f5df2 100644 (file)
@@ -429,7 +429,6 @@ int nilfs_mdt_init(struct inode *inode, gfp_t gfp_mask, size_t objsz)
 
        inode->i_mode = S_IFREG;
        mapping_set_gfp_mask(inode->i_mapping, gfp_mask);
-       inode->i_mapping->backing_dev_info = inode->i_sb->s_bdi;
 
        inode->i_op = &def_mdt_iops;
        inode->i_fop = &def_mdt_fops;
@@ -457,13 +456,12 @@ int nilfs_mdt_setup_shadow_map(struct inode *inode,
                               struct nilfs_shadow_map *shadow)
 {
        struct nilfs_mdt_info *mi = NILFS_MDT(inode);
-       struct backing_dev_info *bdi = inode->i_sb->s_bdi;
 
        INIT_LIST_HEAD(&shadow->frozen_buffers);
        address_space_init_once(&shadow->frozen_data);
-       nilfs_mapping_init(&shadow->frozen_data, inode, bdi);
+       nilfs_mapping_init(&shadow->frozen_data, inode);
        address_space_init_once(&shadow->frozen_btnodes);
-       nilfs_mapping_init(&shadow->frozen_btnodes, inode, bdi);
+       nilfs_mapping_init(&shadow->frozen_btnodes, inode);
        mi->mi_shadow = shadow;
        return 0;
 }
index da276640f7763d2463c0fa99cb832a86d243f10c..700ecbcca55d569d6f2c147f29eba8878c324f07 100644 (file)
@@ -461,14 +461,12 @@ unsigned nilfs_page_count_clean_buffers(struct page *page,
        return nc;
 }
 
-void nilfs_mapping_init(struct address_space *mapping, struct inode *inode,
-                       struct backing_dev_info *bdi)
+void nilfs_mapping_init(struct address_space *mapping, struct inode *inode)
 {
        mapping->host = inode;
        mapping->flags = 0;
        mapping_set_gfp_mask(mapping, GFP_NOFS);
        mapping->private_data = NULL;
-       mapping->backing_dev_info = bdi;
        mapping->a_ops = &empty_aops;
 }
 
index ef30c5c2426f47259a03600b2d074463e07d0b54..a43b8287d012a9f77a64171a02fd06b3d1d62c38 100644 (file)
@@ -57,8 +57,7 @@ int nilfs_copy_dirty_pages(struct address_space *, struct address_space *);
 void nilfs_copy_back_pages(struct address_space *, struct address_space *);
 void nilfs_clear_dirty_page(struct page *, bool);
 void nilfs_clear_dirty_pages(struct address_space *, bool);
-void nilfs_mapping_init(struct address_space *mapping, struct inode *inode,
-                       struct backing_dev_info *bdi);
+void nilfs_mapping_init(struct address_space *mapping, struct inode *inode);
 unsigned nilfs_page_count_clean_buffers(struct page *, unsigned, unsigned);
 unsigned long nilfs_find_uncommitted_extent(struct inode *inode,
                                            sector_t start_blk,
index 3d4bbac36beaff7719e1d023cf4852dd1fd2cd15..5bc2a1cf73c35311013a3e97636f5366ee131a8e 100644 (file)
@@ -166,7 +166,7 @@ struct inode *nilfs_alloc_inode(struct super_block *sb)
        ii->i_state = 0;
        ii->i_cno = 0;
        ii->vfs_inode.i_version = 1;
-       nilfs_mapping_init(&ii->i_btnode_cache, &ii->vfs_inode, sb->s_bdi);
+       nilfs_mapping_init(&ii->i_btnode_cache, &ii->vfs_inode);
        return &ii->vfs_inode;
 }
 
index 6000d3029b26d847bcf0795684de3de21fa8f817..061ba6a91bf2faa66ef1ea3ad797e47e202deeb7 100644 (file)
@@ -398,7 +398,6 @@ static struct inode *dlmfs_get_root_inode(struct super_block *sb)
        if (inode) {
                inode->i_ino = get_next_ino();
                inode_init_owner(inode, NULL, mode);
-               inode->i_mapping->backing_dev_info = &noop_backing_dev_info;
                inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
                inc_nlink(inode);
 
@@ -422,7 +421,6 @@ static struct inode *dlmfs_get_inode(struct inode *parent,
 
        inode->i_ino = get_next_ino();
        inode_init_owner(inode, parent, mode);
-       inode->i_mapping->backing_dev_info = &noop_backing_dev_info;
        inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
 
        ip = DLMFS_I(inode);
index ad4d712002f4fda48897089f37c4c70d839c883d..889d558b4e05518e6b14280d8ffea7ec28d7f85c 100644 (file)
@@ -59,7 +59,6 @@ struct inode *ramfs_get_inode(struct super_block *sb,
                inode->i_ino = get_next_ino();
                inode_init_owner(inode, dir, mode);
                inode->i_mapping->a_ops = &ramfs_aops;
-               inode->i_mapping->backing_dev_info = &noop_backing_dev_info;
                mapping_set_gfp_mask(inode->i_mapping, GFP_HIGHUSER);
                mapping_set_unevictable(inode->i_mapping);
                inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
index e98dd88197d50241eec236575573bc5cab924aa4..268733cda397eb7780f45d966cdca822daad16e8 100644 (file)
@@ -355,9 +355,6 @@ static struct inode *romfs_iget(struct super_block *sb, unsigned long pos)
        case ROMFH_REG:
                i->i_fop = &romfs_ro_fops;
                i->i_data.a_ops = &romfs_aops;
-               if (i->i_sb->s_mtd)
-                       i->i_data.backing_dev_info =
-                               i->i_sb->s_mtd->backing_dev_info;
                if (nextfh & ROMFH_EXEC)
                        mode |= S_IXUGO;
                break;
index ea41649e4ca55e299853bb2dff7592c5ad171f2c..c49b1981ac95f60b28f0310bee3daad411bfbd43 100644 (file)
@@ -108,8 +108,6 @@ struct inode *ubifs_new_inode(struct ubifs_info *c, const struct inode *dir,
        inode->i_mtime = inode->i_atime = inode->i_ctime =
                         ubifs_current_time(inode);
        inode->i_mapping->nrpages = 0;
-       /* Disable readahead */
-       inode->i_mapping->backing_dev_info = &c->bdi;
 
        switch (mode & S_IFMT) {
        case S_IFREG:
index ed93dc6ae245c43caf685f572c22cc13b22646af..6197154f36ca404a257fc64b255f1c487f9661ca 100644 (file)
@@ -156,9 +156,6 @@ struct inode *ubifs_iget(struct super_block *sb, unsigned long inum)
        if (err)
                goto out_invalid;
 
-       /* Disable read-ahead */
-       inode->i_mapping->backing_dev_info = &c->bdi;
-
        switch (inode->i_mode & S_IFMT) {
        case S_IFREG:
                inode->i_mapping->a_ops = &ubifs_file_address_operations;
index 1dada399aa2310f427d25373b3a16d4559a1e189..65d02de342e129a401ca92283ac74685e616387c 100644 (file)
@@ -34,6 +34,7 @@
 #include <asm/byteorder.h>
 #include <uapi/linux/fs.h>
 
+struct backing_dev_info;
 struct export_operations;
 struct hd_geometry;
 struct iovec;
@@ -394,7 +395,6 @@ int pagecache_write_end(struct file *, struct address_space *mapping,
                                loff_t pos, unsigned len, unsigned copied,
                                struct page *page, void *fsdata);
 
-struct backing_dev_info;
 struct address_space {
        struct inode            *host;          /* owner: inode, block_device */
        struct radix_tree_root  page_tree;      /* radix tree of all pages */
@@ -409,7 +409,6 @@ struct address_space {
        pgoff_t                 writeback_index;/* writeback starts here */
        const struct address_space_operations *a_ops;   /* methods */
        unsigned long           flags;          /* error bits/gfp mask */
-       struct backing_dev_info *backing_dev_info; /* device readahead, etc */
        spinlock_t              private_lock;   /* for use by the address_space */
        struct list_head        private_list;   /* ditto */
        void                    *private_data;  /* ditto */
index 16c68958aedadb3ec6f312527505a8f323047bf0..52e0c7652448bdeb8807e17b0518846663661ccd 100644 (file)
@@ -24,7 +24,6 @@ struct backing_dev_info noop_backing_dev_info = {
        .name           = "noop",
        .capabilities   = BDI_CAP_NO_ACCT_AND_WRITEBACK,
 };
-EXPORT_SYMBOL_GPL(noop_backing_dev_info);
 
 static struct class *bdi_class;
 
index 1b77eaf589fd7c478976188082d2f7520b9ea14c..4c61d3d5bfb41f5bbea9964bd49b87551ea63b45 100644 (file)
@@ -1410,7 +1410,6 @@ static struct inode *shmem_get_inode(struct super_block *sb, const struct inode
                inode->i_ino = get_next_ino();
                inode_init_owner(inode, dir, mode);
                inode->i_blocks = 0;
-               inode->i_mapping->backing_dev_info = &noop_backing_dev_info;
                inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
                inode->i_generation = get_seconds();
                info = SHMEM_I(inode);
index 1c137b69ecde5b6f6854a79d124828be653c6d97..405923f773340c4fb0e56f17934eca999e956655 100644 (file)
@@ -37,7 +37,6 @@ struct address_space swapper_spaces[MAX_SWAPFILES] = {
                .page_tree      = RADIX_TREE_INIT(GFP_ATOMIC|__GFP_NOWARN),
                .i_mmap_writable = ATOMIC_INIT(0),
                .a_ops          = &swap_aops,
-               .backing_dev_info = &noop_backing_dev_info,
        }
 };