Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 349605
b: refs/heads/master
c: 5d1f402
h: refs/heads/master
i:
  349603: fefd6fa
v: v3
  • Loading branch information
Josef Bacik committed Feb 5, 2013
1 parent 57d8dcf commit 11800ac
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6f1c36055f96e80031c7fdda3fd5be826b8d7782
refs/heads/master: 5d1f40202bad12d4c70a2d40a420b30d23a72b1a
11 changes: 9 additions & 2 deletions trunk/fs/btrfs/ordered-data.c
Original file line number Diff line number Diff line change
Expand Up @@ -836,9 +836,16 @@ int btrfs_ordered_update_i_size(struct inode *inode, u64 offset,
* if the disk i_size is already at the inode->i_size, or
* this ordered extent is inside the disk i_size, we're done
*/
if (disk_i_size == i_size || offset <= disk_i_size) {
if (disk_i_size == i_size)
goto out;

/*
* We still need to update disk_i_size if outstanding_isize is greater
* than disk_i_size.
*/
if (offset <= disk_i_size &&
(!ordered || ordered->outstanding_isize <= disk_i_size))
goto out;
}

/*
* walk backward from this ordered extent to disk_i_size.
Expand Down

0 comments on commit 11800ac

Please sign in to comment.