summaryrefslogtreecommitdiffstats
path: root/fs/ext4
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/inode.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 60af5126eb05..f60b459b27d7 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -3179,7 +3179,6 @@ int ext4_discard_partial_page_buffers_no_lock(handle_t *handle,
ext4_fsblk_t index = from >> PAGE_CACHE_SHIFT;
unsigned int offset = from & (PAGE_CACHE_SIZE-1);
unsigned int blocksize, max, pos;
- unsigned int end_of_block, range_to_discard;
ext4_lblk_t iblock;
struct buffer_head *bh;
int err = 0;
@@ -3231,6 +3230,8 @@ int ext4_discard_partial_page_buffers_no_lock(handle_t *handle,
pos = offset;
while (pos < offset + length) {
+ unsigned int end_of_block, range_to_discard;
+
err = 0;
/* The length of space left to zero and unmap */