Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7caef267 authored by Kirill A. Shutemov's avatar Kirill A. Shutemov Committed by Linus Torvalds
Browse files

truncate: drop 'oldsize' truncate_pagecache() parameter



truncate_pagecache() doesn't care about old size since commit
cedabed4 ("vfs: Fix vmtruncate() regression").  Let's drop it.

Signed-off-by: default avatarKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 5fbc4616
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -50,7 +50,7 @@ static void adfs_write_failed(struct address_space *mapping, loff_t to)
	struct inode *inode = mapping->host;

	if (to > inode->i_size)
		truncate_pagecache(inode, to, inode->i_size);
		truncate_pagecache(inode, inode->i_size);
}

static int adfs_write_begin(struct file *file, struct address_space *mapping,
+1 −1
Original line number Diff line number Diff line
@@ -406,7 +406,7 @@ static void affs_write_failed(struct address_space *mapping, loff_t to)
	struct inode *inode = mapping->host;

	if (to > inode->i_size) {
		truncate_pagecache(inode, to, inode->i_size);
		truncate_pagecache(inode, inode->i_size);
		affs_truncate(inode);
	}
}
+1 −1
Original line number Diff line number Diff line
@@ -166,7 +166,7 @@ static void bfs_write_failed(struct address_space *mapping, loff_t to)
	struct inode *inode = mapping->host;

	if (to > inode->i_size)
		truncate_pagecache(inode, to, inode->i_size);
		truncate_pagecache(inode, inode->i_size);
}

static int bfs_write_begin(struct file *file, struct address_space *mapping,
+1 −3
Original line number Diff line number Diff line
@@ -221,12 +221,10 @@ int btrfs_truncate_free_space_cache(struct btrfs_root *root,
				    struct btrfs_path *path,
				    struct inode *inode)
{
	loff_t oldsize;
	int ret = 0;

	oldsize = i_size_read(inode);
	btrfs_i_size_write(inode, 0);
	truncate_pagecache(inode, oldsize, 0);
	truncate_pagecache(inode, 0);

	/*
	 * We don't need an orphan item because truncating the free space cache
+1 −1
Original line number Diff line number Diff line
@@ -4409,7 +4409,7 @@ static int btrfs_setsize(struct inode *inode, struct iattr *attr)
		inode->i_ctime = inode->i_mtime = current_fs_time(inode->i_sb);

	if (newsize > oldsize) {
		truncate_pagecache(inode, oldsize, newsize);
		truncate_pagecache(inode, newsize);
		ret = btrfs_cont_expand(inode, oldsize, newsize);
		if (ret)
			return ret;
Loading