diff options
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/ioctl.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index afde837644e5..18cc23d164a8 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c | |||
@@ -1186,6 +1186,9 @@ int btrfs_defrag_file(struct inode *inode, struct file *file, | |||
1186 | if (newer_off == (u64)-1) | 1186 | if (newer_off == (u64)-1) |
1187 | break; | 1187 | break; |
1188 | 1188 | ||
1189 | if (ret > 0) | ||
1190 | i += ret; | ||
1191 | |||
1189 | newer_off = max(newer_off + 1, | 1192 | newer_off = max(newer_off + 1, |
1190 | (u64)i << PAGE_CACHE_SHIFT); | 1193 | (u64)i << PAGE_CACHE_SHIFT); |
1191 | 1194 | ||