]> git.hungrycats.org Git - linux/commitdiff
btrfs: delete unused argument in btrfs_copy_from_user
authorZhao Lei <zhaolei@cn.fujitsu.com>
Wed, 6 Jan 2016 10:47:31 +0000 (18:47 +0800)
committerZygo Blaxell <zblaxell@thirteen.furryterror.org>
Sun, 24 Jan 2016 04:09:56 +0000 (23:09 -0500)
size_t write_bytes is not necessary for btrfs_copy_from_user(),
delete it.

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
(cherry picked from commit ee22f0c4ec428e7f16d3c5fa1d55fd7860cb304a)

fs/btrfs/file.c

index c8f4994dd93bc5148dec570bd606f869df2cc516..c8112d41cf590a605183b55fdca1c268d82f4ee4 100644 (file)
@@ -406,8 +406,7 @@ int btrfs_run_defrag_inodes(struct btrfs_fs_info *fs_info)
 /* simple helper to fault in pages and copy.  This should go away
  * and be replaced with calls into generic code.
  */
-static noinline int btrfs_copy_from_user(loff_t pos, int num_pages,
-                                        size_t write_bytes,
+static noinline int btrfs_copy_from_user(loff_t pos, size_t write_bytes,
                                         struct page **prepared_pages,
                                         struct iov_iter *i)
 {
@@ -1587,8 +1586,7 @@ again:
                        ret = 0;
                }
 
-               copied = btrfs_copy_from_user(pos, num_pages,
-                                          write_bytes, pages, i);
+               copied = btrfs_copy_from_user(pos, write_bytes, pages, i);
 
                /*
                 * if we have trouble faulting in the pages, fall