[PATCH 17/17] fs: Remove mapping->private_list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Noone uses this list anymore. Remove it.

Signed-off-by: Jan Kara <jack@xxxxxxx>
---
 Documentation/filesystems/porting | 4 ++++
 fs/ext3/inode.c                   | 3 ---
 fs/inode.c                        | 6 ++----
 fs/ntfs/file.c                    | 6 +++---
 fs/super.c                        | 2 --
 include/linux/fs.h                | 1 -
 6 files changed, 9 insertions(+), 13 deletions(-)

diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting
index 26ce6cd742c6..756fb0eebe60 100644
--- a/Documentation/filesystems/porting
+++ b/Documentation/filesystems/porting
@@ -458,3 +458,7 @@ in your dentry operations instead.
 	of the in-tree instances did).  inode_hash_lock is still held,
 	of course, so they are still serialized wrt removal from inode hash,
 	as well as wrt set() callback of iget5_locked().
+--
+[mandatory]
+	inode->i_data.private_list and inode->i_data.private_data are gone.
+	Use fields in filesystem's own inode structure instead.
diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c
index 384b6ebb655f..45be4e34ea20 100644
--- a/fs/ext3/inode.c
+++ b/fs/ext3/inode.c
@@ -1365,9 +1365,6 @@ static void update_file_sizes(struct inode *inode, loff_t pos, unsigned copied)
 /*
  * We need to pick up the new inode size which generic_commit_write gave us
  * `file' can be NULL - eg, when called from page_symlink().
- *
- * ext3 never places buffers on inode->i_mapping->private_list.  metadata
- * buffers are managed internally.
  */
 static int ext3_ordered_write_end(struct file *file,
 				struct address_space *mapping,
diff --git a/fs/inode.c b/fs/inode.c
index 1f22605768cf..0ea7964687e2 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -349,7 +349,6 @@ void address_space_init_once(struct address_space *mapping)
 	INIT_RADIX_TREE(&mapping->page_tree, GFP_ATOMIC);
 	spin_lock_init(&mapping->tree_lock);
 	mutex_init(&mapping->i_mmap_mutex);
-	INIT_LIST_HEAD(&mapping->private_list);
 	spin_lock_init(&mapping->private_lock);
 	mapping->i_mmap = RB_ROOT;
 	INIT_LIST_HEAD(&mapping->i_mmap_nonlinear);
@@ -503,7 +502,6 @@ void clear_inode(struct inode *inode)
 	spin_lock_irq(&inode->i_data.tree_lock);
 	BUG_ON(inode->i_data.nrpages);
 	spin_unlock_irq(&inode->i_data.tree_lock);
-	BUG_ON(!list_empty(&inode->i_data.private_list));
 	BUG_ON(!(inode->i_state & I_FREEING));
 	BUG_ON(inode->i_state & I_CLEAR);
 	/* don't need i_lock here, no concurrent mods to i_state */
@@ -670,8 +668,8 @@ int invalidate_inodes(struct super_block *sb, bool kill_dirty)
  * Isolate the inode from the LRU in preparation for freeing it.
  *
  * Any inodes which are pinned purely because of attached pagecache have their
- * pagecache removed.  If the inode has metadata buffers attached to
- * mapping->private_list then try to remove them.
+ * pagecache removed.  If the inode has metadata buffers attached to it, then
+ * try to remove them.
  *
  * If the inode has the I_REFERENCED flag set, then it means that it has been
  * used recently - the flag is set in iput_final(). When we encounter such an
diff --git a/fs/ntfs/file.c b/fs/ntfs/file.c
index db9bd8a31725..c210eaf1b0a8 100644
--- a/fs/ntfs/file.c
+++ b/fs/ntfs/file.c
@@ -2183,9 +2183,9 @@ static int ntfs_file_fsync(struct file *filp, loff_t start, loff_t end,
 		ret = __ntfs_write_inode(vi, 1);
 	write_inode_now(vi, !datasync);
 	/*
-	 * NOTE: If we were to use mapping->private_list (see ext2 and
-	 * fs/buffer.c) for dirty blocks then we could optimize the below to be
-	 * sync_mapping_buffers(vi->i_mapping).
+	 * NOTE: If we were to use list of associated metadata buffers (see
+	 * ext2 and fs/buffer.c) for dirty blocks then we could optimize the
+	 * below to be sync_mapping_buffers(vi->i_mapping).
 	 */
 	err = sync_blockdev(vi->i_sb->s_bdev);
 	if (unlikely(err && !ret))
diff --git a/fs/super.c b/fs/super.c
index 4192e3356e37..80d5cf2ca765 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -219,8 +219,6 @@ static struct super_block *alloc_super(struct file_system_type *type, int flags)
 	s->s_op = &default_op;
 	s->s_time_gran = 1000000000;
 	s->cleancache_poolid = -1;
-	s->s_inode_fields[IF_META_BHS] = offsetof(struct inode,
-						  i_data.private_list);
 
 	s->s_shrink.seeks = DEFAULT_SEEKS;
 	s->s_shrink.scan_objects = super_cache_scan;
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 37bc82f7a02d..59eb75503226 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -424,7 +424,6 @@ struct address_space {
 	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 */
 } __attribute__((aligned(sizeof(long))));
 	/*
 	 * On most architectures that alignment is already the case; but
-- 
1.8.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux