aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorNamjae Jeon <linkinjeon@gmail.com>2012-12-11 19:00:21 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-12-11 20:22:21 -0500
commitd0e1d66b5aa1ec9f556f951aa9a114cc192cd01c (patch)
tree3c3d9d8a1575a5fff0233d70951ed7d94c9a1e7e /fs
parentb58ed041a360ed051fab17e4d9b0f451c6fedba7 (diff)
writeback: remove nr_pages_dirtied arg from balance_dirty_pages_ratelimited_nr()
There is no reason to pass the nr_pages_dirtied argument, because nr_pages_dirtied value from the caller is unused in balance_dirty_pages_ratelimited_nr(). Signed-off-by: Namjae Jeon <linkinjeon@gmail.com> Signed-off-by: Vivek Trivedi <vtrivedi018@gmail.com> Cc: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/disk-io.c8
-rw-r--r--fs/btrfs/file.c3
-rw-r--r--fs/btrfs/ioctl.c2
-rw-r--r--fs/ocfs2/file.c5
-rw-r--r--fs/splice.c5
5 files changed, 8 insertions, 15 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 7cda51995c1e..22a0439e5a86 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -3416,8 +3416,8 @@ void btrfs_btree_balance_dirty(struct btrfs_root *root, unsigned long nr)
3416 num_dirty = root->fs_info->dirty_metadata_bytes; 3416 num_dirty = root->fs_info->dirty_metadata_bytes;
3417 3417
3418 if (num_dirty > thresh) { 3418 if (num_dirty > thresh) {
3419 balance_dirty_pages_ratelimited_nr( 3419 balance_dirty_pages_ratelimited(
3420 root->fs_info->btree_inode->i_mapping, 1); 3420 root->fs_info->btree_inode->i_mapping);
3421 } 3421 }
3422 return; 3422 return;
3423} 3423}
@@ -3437,8 +3437,8 @@ void __btrfs_btree_balance_dirty(struct btrfs_root *root, unsigned long nr)
3437 num_dirty = root->fs_info->dirty_metadata_bytes; 3437 num_dirty = root->fs_info->dirty_metadata_bytes;
3438 3438
3439 if (num_dirty > thresh) { 3439 if (num_dirty > thresh) {
3440 balance_dirty_pages_ratelimited_nr( 3440 balance_dirty_pages_ratelimited(
3441 root->fs_info->btree_inode->i_mapping, 1); 3441 root->fs_info->btree_inode->i_mapping);
3442 } 3442 }
3443 return; 3443 return;
3444} 3444}
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index 9ab1bed88116..a8ee75cb96ee 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -1346,8 +1346,7 @@ static noinline ssize_t __btrfs_buffered_write(struct file *file,
1346 1346
1347 cond_resched(); 1347 cond_resched();
1348 1348
1349 balance_dirty_pages_ratelimited_nr(inode->i_mapping, 1349 balance_dirty_pages_ratelimited(inode->i_mapping);
1350 dirty_pages);
1351 if (dirty_pages < (root->leafsize >> PAGE_CACHE_SHIFT) + 1) 1350 if (dirty_pages < (root->leafsize >> PAGE_CACHE_SHIFT) + 1)
1352 btrfs_btree_balance_dirty(root, 1); 1351 btrfs_btree_balance_dirty(root, 1);
1353 1352
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 8fcf9a59c28d..5b3429ab8ec1 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -1225,7 +1225,7 @@ int btrfs_defrag_file(struct inode *inode, struct file *file,
1225 } 1225 }
1226 1226
1227 defrag_count += ret; 1227 defrag_count += ret;
1228 balance_dirty_pages_ratelimited_nr(inode->i_mapping, ret); 1228 balance_dirty_pages_ratelimited(inode->i_mapping);
1229 mutex_unlock(&inode->i_mutex); 1229 mutex_unlock(&inode->i_mutex);
1230 1230
1231 if (newer_than) { 1231 if (newer_than) {
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index 5a4ee77cec51..dda089804942 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -2513,18 +2513,15 @@ static ssize_t ocfs2_file_splice_write(struct pipe_inode_info *pipe,
2513 ret = sd.num_spliced; 2513 ret = sd.num_spliced;
2514 2514
2515 if (ret > 0) { 2515 if (ret > 0) {
2516 unsigned long nr_pages;
2517 int err; 2516 int err;
2518 2517
2519 nr_pages = (ret + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
2520
2521 err = generic_write_sync(out, *ppos, ret); 2518 err = generic_write_sync(out, *ppos, ret);
2522 if (err) 2519 if (err)
2523 ret = err; 2520 ret = err;
2524 else 2521 else
2525 *ppos += ret; 2522 *ppos += ret;
2526 2523
2527 balance_dirty_pages_ratelimited_nr(mapping, nr_pages); 2524 balance_dirty_pages_ratelimited(mapping);
2528 } 2525 }
2529 2526
2530 return ret; 2527 return ret;
diff --git a/fs/splice.c b/fs/splice.c
index 13e5b4776e7a..8890604e3fcd 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -1024,17 +1024,14 @@ generic_file_splice_write(struct pipe_inode_info *pipe, struct file *out,
1024 ret = sd.num_spliced; 1024 ret = sd.num_spliced;
1025 1025
1026 if (ret > 0) { 1026 if (ret > 0) {
1027 unsigned long nr_pages;
1028 int err; 1027 int err;
1029 1028
1030 nr_pages = (ret + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
1031
1032 err = generic_write_sync(out, *ppos, ret); 1029 err = generic_write_sync(out, *ppos, ret);
1033 if (err) 1030 if (err)
1034 ret = err; 1031 ret = err;
1035 else 1032 else
1036 *ppos += ret; 1033 *ppos += ret;
1037 balance_dirty_pages_ratelimited_nr(mapping, nr_pages); 1034 balance_dirty_pages_ratelimited(mapping);
1038 } 1035 }
1039 sb_end_write(inode->i_sb); 1036 sb_end_write(inode->i_sb);
1040 1037