diff options
author | Chris Mason <chris.mason@fusionio.com> | 2013-02-05 10:04:03 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2013-02-05 10:04:03 -0500 |
commit | 0e4e02636611dbf89a2f36320a32054f9936d6cb (patch) | |
tree | 18b4ecc6c3812770b29729d7abbdc673ffd73a41 /fs/btrfs/file.c | |
parent | 1f0905ec156eec8f12cd593bc564551770319720 (diff) | |
parent | 1eafa6c73791e4f312324ddad9cbcaf6a1b6052b (diff) | |
download | kernel_goldelico_gta04-0e4e02636611dbf89a2f36320a32054f9936d6cb.zip kernel_goldelico_gta04-0e4e02636611dbf89a2f36320a32054f9936d6cb.tar.gz kernel_goldelico_gta04-0e4e02636611dbf89a2f36320a32054f9936d6cb.tar.bz2 |
Merge branch 'for-linus' into raid56-experimental
Conflicts:
fs/btrfs/volumes.c
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs/file.c')
-rw-r--r-- | fs/btrfs/file.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 20452c1..841cfe3 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -2242,6 +2242,7 @@ static int find_desired_extent(struct inode *inode, loff_t *offset, int origin) if (lockend <= lockstart) lockend = lockstart + root->sectorsize; + lockend--; len = lockend - lockstart + 1; len = max_t(u64, len, root->sectorsize); @@ -2308,9 +2309,12 @@ static int find_desired_extent(struct inode *inode, loff_t *offset, int origin) } } - *offset = start; - free_extent_map(em); - break; + if (!test_bit(EXTENT_FLAG_PREALLOC, + &em->flags)) { + *offset = start; + free_extent_map(em); + break; + } } } |