Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 128342
b: refs/heads/master
c: 79b2cb1
h: refs/heads/master
v: v3
  • Loading branch information
Chris Mason authored and David Woodhouse committed Apr 10, 2007
1 parent c11cc42 commit 2e945d3
Show file tree
Hide file tree
Showing 2 changed files with 4 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: 48ddc6f44b5a167c00573b6012727d674e9c667a
refs/heads/master: 79b2cb1fa6430501907cb1384abbddf074833e45
5 changes: 3 additions & 2 deletions trunk/fs/btrfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -1020,7 +1020,7 @@ static int btrfs_get_block_lock(struct inode *inode, sector_t iblock,

ret = btrfs_lookup_file_extent(trans, root, path,
inode->i_ino,
iblock << inode->i_blkbits, 1);
iblock << inode->i_blkbits, create);
if (ret < 0) {
err = ret;
goto out;
Expand All @@ -1046,7 +1046,8 @@ static int btrfs_get_block_lock(struct inode *inode, sector_t iblock,
if (ret == 0) {
err = 0;
BUG_ON(btrfs_file_extent_disk_num_blocks(item) != 1);
if (btrfs_file_extent_generation(item) != trans->transid) {
if (create &&
btrfs_file_extent_generation(item) != trans->transid) {
struct btrfs_key ins;
ret = btrfs_alloc_extent(trans, root, 1,
blocknr, (u64)-1, &ins);
Expand Down

0 comments on commit 2e945d3

Please sign in to comment.