Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 128639
b: refs/heads/master
c: f392a93
h: refs/heads/master
i:
  128637: 0dbfc80
  128635: 3c65a2e
  128631: 7f6db9f
  128623: 2e3f6f2
  128607: c06f711
  128575: cd0dc58
  128511: 6650f35
v: v3
  • Loading branch information
Chris Mason committed Sep 25, 2008
1 parent 98e9978 commit c6d48bc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 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: b1632b10c0133992fd0290b4836c47661bed4396
refs/heads/master: f392a938f3cc36a2abe68db9286bd864c3b2f7dd
6 changes: 3 additions & 3 deletions trunk/fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,7 @@ static int btrfs_setattr(struct dentry *dentry, struct iattr *attr)

u64 mask = root->sectorsize - 1;
u64 pos = (inode->i_size + mask) & ~mask;
u64 block_end = attr->ia_size | mask;
u64 block_end = (attr->ia_size + mask) & ~mask;
u64 hole_start;
u64 hole_size;
u64 alloc_hint = 0;
Expand All @@ -1022,7 +1022,7 @@ static int btrfs_setattr(struct dentry *dentry, struct iattr *attr)

btrfs_truncate_page(inode->i_mapping, inode->i_size);

lock_extent(io_tree, pos, block_end, GFP_NOFS);
lock_extent(io_tree, pos, block_end - 1, GFP_NOFS);
hole_size = block_end - hole_start;

mutex_lock(&root->fs_info->fs_mutex);
Expand All @@ -1043,7 +1043,7 @@ static int btrfs_setattr(struct dentry *dentry, struct iattr *attr)
}
btrfs_end_transaction(trans, root);
mutex_unlock(&root->fs_info->fs_mutex);
unlock_extent(io_tree, pos, block_end, GFP_NOFS);
unlock_extent(io_tree, pos, block_end - 1, GFP_NOFS);
if (err)
return err;
}
Expand Down

0 comments on commit c6d48bc

Please sign in to comment.