btrfs/file.c: remove an unsed varialbe first_index
authorShan Hai <shan.hai@windriver.com>
Mon, 21 Sep 2015 03:40:57 +0000 (11:40 +0800)
committerDavid Sterba <dsterba@suse.com>
Wed, 21 Oct 2015 16:28:48 +0000 (18:28 +0200)
The commit b37392ea86761 ("Btrfs: cleanup unnecessary parameter
and variant of prepare_pages()") makes it redundant.

Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: Shan Hai <haishan.bai@hotmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/file.c

index b823fac91c9289bc67d3bb5191f4ce96e38294ac..b6695c43859dd9384c469fbba65a1bd58c9e0fd5 100644 (file)
@@ -1469,7 +1469,6 @@ static noinline ssize_t __btrfs_buffered_write(struct file *file,
        u64 release_bytes = 0;
        u64 lockstart;
        u64 lockend;
-       unsigned long first_index;
        size_t num_written = 0;
        int nrptrs;
        int ret = 0;
@@ -1485,8 +1484,6 @@ static noinline ssize_t __btrfs_buffered_write(struct file *file,
        if (!pages)
                return -ENOMEM;
 
-       first_index = pos >> PAGE_CACHE_SHIFT;
-
        while (iov_iter_count(i) > 0) {
                size_t offset = pos & (PAGE_CACHE_SIZE - 1);
                size_t write_bytes = min(iov_iter_count(i),