aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorMitch Harder <mitch.harder@sabayonlinux.org>2011-07-12 15:43:45 -0400
committerChris Mason <chris.mason@oracle.com>2011-08-01 14:32:39 -0400
commit341d14f161a475ebdbc9adff1f7e681e1185dee9 (patch)
treefff1cee32665375837b5ae735ddff17a173f24db /fs
parent69261c4b6a394ead1b5ca2966c908469355eb603 (diff)
Btrfs: Remove unused variable 'last_index' in file.c
The variable 'last_index' is calculated in the __btrfs_buffered_write function and passed as a parameter to the prepare_pages function, but is not used anywhere in the prepare_pages function. Remove instances of 'last_index' in these functions. Signed-off-by: Mitch Harder <mitch.harder@sabayonlinux.org> Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/file.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index 7f134a730efb..010aec8be824 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -1059,7 +1059,7 @@ static int prepare_uptodate_page(struct page *page, u64 pos)
1059static noinline int prepare_pages(struct btrfs_root *root, struct file *file, 1059static noinline int prepare_pages(struct btrfs_root *root, struct file *file,
1060 struct page **pages, size_t num_pages, 1060 struct page **pages, size_t num_pages,
1061 loff_t pos, unsigned long first_index, 1061 loff_t pos, unsigned long first_index,
1062 unsigned long last_index, size_t write_bytes) 1062 size_t write_bytes)
1063{ 1063{
1064 struct extent_state *cached_state = NULL; 1064 struct extent_state *cached_state = NULL;
1065 int i; 1065 int i;
@@ -1159,7 +1159,6 @@ static noinline ssize_t __btrfs_buffered_write(struct file *file,
1159 struct btrfs_root *root = BTRFS_I(inode)->root; 1159 struct btrfs_root *root = BTRFS_I(inode)->root;
1160 struct page **pages = NULL; 1160 struct page **pages = NULL;
1161 unsigned long first_index; 1161 unsigned long first_index;
1162 unsigned long last_index;
1163 size_t num_written = 0; 1162 size_t num_written = 0;
1164 int nrptrs; 1163 int nrptrs;
1165 int ret = 0; 1164 int ret = 0;
@@ -1172,7 +1171,6 @@ static noinline ssize_t __btrfs_buffered_write(struct file *file,
1172 return -ENOMEM; 1171 return -ENOMEM;
1173 1172
1174 first_index = pos >> PAGE_CACHE_SHIFT; 1173 first_index = pos >> PAGE_CACHE_SHIFT;
1175 last_index = (pos + iov_iter_count(i)) >> PAGE_CACHE_SHIFT;
1176 1174
1177 while (iov_iter_count(i) > 0) { 1175 while (iov_iter_count(i) > 0) {
1178 size_t offset = pos & (PAGE_CACHE_SIZE - 1); 1176 size_t offset = pos & (PAGE_CACHE_SIZE - 1);
@@ -1206,8 +1204,7 @@ static noinline ssize_t __btrfs_buffered_write(struct file *file,
1206 * contents of pages from loop to loop 1204 * contents of pages from loop to loop
1207 */ 1205 */
1208 ret = prepare_pages(root, file, pages, num_pages, 1206 ret = prepare_pages(root, file, pages, num_pages,
1209 pos, first_index, last_index, 1207 pos, first_index, write_bytes);
1210 write_bytes);
1211 if (ret) { 1208 if (ret) {
1212 btrfs_delalloc_release_space(inode, 1209 btrfs_delalloc_release_space(inode,
1213 num_pages << PAGE_CACHE_SHIFT); 1210 num_pages << PAGE_CACHE_SHIFT);