file.c (ac3c0d36a2a2f7a8f9778faef3f2639f5bf29d44) file.c (dbbf49928f2eb118036766fae503be1314620cce)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (C) 2007 Oracle. All rights reserved.
4 */
5
6#include <linux/fs.h>
7#include <linux/pagemap.h>
8#include <linux/time.h>

--- 459 unchanged lines hidden (view full) ---

468 end_of_last_block = start_pos + num_bytes - 1;
469
470 /*
471 * The pages may have already been dirty, clear out old accounting so
472 * we can set things up properly
473 */
474 clear_extent_bit(&inode->io_tree, start_pos, end_of_last_block,
475 EXTENT_DELALLOC | EXTENT_DO_ACCOUNTING | EXTENT_DEFRAG,
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (C) 2007 Oracle. All rights reserved.
4 */
5
6#include <linux/fs.h>
7#include <linux/pagemap.h>
8#include <linux/time.h>

--- 459 unchanged lines hidden (view full) ---

468 end_of_last_block = start_pos + num_bytes - 1;
469
470 /*
471 * The pages may have already been dirty, clear out old accounting so
472 * we can set things up properly
473 */
474 clear_extent_bit(&inode->io_tree, start_pos, end_of_last_block,
475 EXTENT_DELALLOC | EXTENT_DO_ACCOUNTING | EXTENT_DEFRAG,
476 0, 0, cached);
476 0, cached);
477
478 err = btrfs_set_extent_delalloc(inode, start_pos, end_of_last_block,
479 extra_bits, cached);
480 if (err)
481 return err;
482
483 for (i = 0; i < num_pages; i++) {
484 struct page *p = pages[i];

--- 3760 unchanged lines hidden ---
477
478 err = btrfs_set_extent_delalloc(inode, start_pos, end_of_last_block,
479 extra_bits, cached);
480 if (err)
481 return err;
482
483 for (i = 0; i < num_pages; i++) {
484 struct page *p = pages[i];

--- 3760 unchanged lines hidden ---