From fc0ecff698165ae8e178efa086e0dd1f385206b1 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Sat, 10 Feb 2007 01:45:39 -0800 Subject: [PATCH] remove invalidate_inode_pages() Convert all calls to invalidate_inode_pages() into open-coded calls to invalidate_mapping_pages(). Leave the invalidate_inode_pages() wrapper in place for now, marked as deprecated. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/9p/vfs_file.c | 4 ++-- fs/buffer.c | 2 +- fs/drop_caches.c | 2 +- fs/fuse/file.c | 2 +- fs/fuse/inode.c | 2 +- fs/inode.c | 3 ++- fs/jffs/inode-v23.c | 4 ++-- 7 files changed, 10 insertions(+), 9 deletions(-) (limited to 'fs') diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c index 9f17b0cacdd..6c78343cf69 100644 --- a/fs/9p/vfs_file.c +++ b/fs/9p/vfs_file.c @@ -110,7 +110,7 @@ static int v9fs_file_lock(struct file *filp, int cmd, struct file_lock *fl) if ((IS_SETLK(cmd) || IS_SETLKW(cmd)) && fl->fl_type != F_UNLCK) { filemap_write_and_wait(inode->i_mapping); - invalidate_inode_pages(&inode->i_data); + invalidate_mapping_pages(&inode->i_data, 0, -1); } return res; @@ -234,7 +234,7 @@ v9fs_file_write(struct file *filp, const char __user * data, total += result; } while (count); - invalidate_inode_pages2(inode->i_mapping); + invalidate_inode_pages2(inode->i_mapping); return total; } diff --git a/fs/buffer.c b/fs/buffer.c index 1ad674fd348..763c5b59492 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -345,7 +345,7 @@ void invalidate_bdev(struct block_device *bdev, int destroy_dirty_buffers) * We really want to use invalidate_inode_pages2() for * that, but not until that's cleaned up. */ - invalidate_inode_pages(mapping); + invalidate_mapping_pages(mapping, 0, -1); } /* diff --git a/fs/drop_caches.c b/fs/drop_caches.c index 4e4762389bd..03ea7696fe3 100644 --- a/fs/drop_caches.c +++ b/fs/drop_caches.c @@ -20,7 +20,7 @@ static void drop_pagecache_sb(struct super_block *sb) list_for_each_entry(inode, &sb->s_inodes, i_sb_list) { if (inode->i_state & (I_FREEING|I_WILL_FREE)) continue; - invalidate_inode_pages(inode->i_mapping); + invalidate_mapping_pages(inode->i_mapping, 0, -1); } spin_unlock(&inode_lock); } diff --git a/fs/fuse/file.c b/fs/fuse/file.c index f63efe1337e..2fd06927e85 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c @@ -69,7 +69,7 @@ void fuse_finish_open(struct inode *inode, struct file *file, if (outarg->open_flags & FOPEN_DIRECT_IO) file->f_op = &fuse_direct_io_file_operations; if (!(outarg->open_flags & FOPEN_KEEP_CACHE)) - invalidate_inode_pages(inode->i_mapping); + invalidate_mapping_pages(inode->i_mapping, 0, -1); ff->fh = outarg->fh; file->private_data = ff; } diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index 12450d2b320..220255110d7 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c @@ -112,7 +112,7 @@ void fuse_change_attributes(struct inode *inode, struct fuse_attr *attr) { struct fuse_conn *fc = get_fuse_conn(inode); if (S_ISREG(inode->i_mode) && i_size_read(inode) != attr->size) - invalidate_inode_pages(inode->i_mapping); + invalidate_mapping_pages(inode->i_mapping, 0, -1); inode->i_ino = attr->ino; inode->i_mode = (inode->i_mode & S_IFMT) + (attr->mode & 07777); diff --git a/fs/inode.c b/fs/inode.c index 062c5f9b6a6..e6d93070f14 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -414,7 +414,8 @@ static void prune_icache(int nr_to_scan) __iget(inode); spin_unlock(&inode_lock); if (remove_inode_buffers(inode)) - reap += invalidate_inode_pages(&inode->i_data); + reap += invalidate_mapping_pages(&inode->i_data, + 0, -1); iput(inode); spin_lock(&inode_lock); diff --git a/fs/jffs/inode-v23.c b/fs/jffs/inode-v23.c index 43baa1afa02..6ee20668850 100644 --- a/fs/jffs/inode-v23.c +++ b/fs/jffs/inode-v23.c @@ -296,7 +296,7 @@ jffs_setattr(struct dentry *dentry, struct iattr *iattr) inode->i_blocks = (inode->i_size + 511) >> 9; if (len) { - invalidate_inode_pages(inode->i_mapping); + invalidate_mapping_pages(inode->i_mapping, 0, -1); } inode->i_ctime = CURRENT_TIME_SEC; inode->i_mtime = inode->i_ctime; @@ -1518,7 +1518,7 @@ jffs_file_write(struct file *filp, const char *buf, size_t count, } inode->i_ctime = inode->i_mtime = CURRENT_TIME_SEC; mark_inode_dirty(inode); - invalidate_inode_pages(inode->i_mapping); + invalidate_mapping_pages(inode->i_mapping, 0, -1); out_isem: return err; -- cgit v1.2.3-18-g5258