|
@@ -135,6 +135,18 @@ static inline void btrfs_cleanup_ordered_extents(struct inode *inode,
|
|
const u64 offset,
|
|
const u64 offset,
|
|
const u64 bytes)
|
|
const u64 bytes)
|
|
{
|
|
{
|
|
|
|
+ unsigned long index = offset >> PAGE_SHIFT;
|
|
|
|
+ unsigned long end_index = (offset + bytes - 1) >> PAGE_SHIFT;
|
|
|
|
+ struct page *page;
|
|
|
|
+
|
|
|
|
+ while (index <= end_index) {
|
|
|
|
+ page = find_get_page(inode->i_mapping, index);
|
|
|
|
+ index++;
|
|
|
|
+ if (!page)
|
|
|
|
+ continue;
|
|
|
|
+ ClearPagePrivate2(page);
|
|
|
|
+ put_page(page);
|
|
|
|
+ }
|
|
return __endio_write_update_ordered(inode, offset + PAGE_SIZE,
|
|
return __endio_write_update_ordered(inode, offset + PAGE_SIZE,
|
|
bytes - PAGE_SIZE, false);
|
|
bytes - PAGE_SIZE, false);
|
|
}
|
|
}
|