projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
efd049f
)
Btrfs: apply updated fallocate i_size fix
author
Aneesh Kumar K.V
<aneesh.kumar@linux.vnet.ibm.com>
Thu, 4 Feb 2010 16:33:03 +0000
(11:33 -0500)
committer
Chris Mason
<chris.mason@oracle.com>
Thu, 4 Feb 2010 16:33:03 +0000
(11:33 -0500)
This version of the i_size fix for fallocate makes sure we only update
the i_size when the current fallocate is really operating outside of
i_size.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/inode.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/btrfs/inode.c
b/fs/btrfs/inode.c
index 6782aa19130d9d34d88489bf873207399815d197..4deb280f8969b78e373257d394106895d0ea82a6 100644
(file)
--- a/
fs/btrfs/inode.c
+++ b/
fs/btrfs/inode.c
@@
-5799,7
+5799,9
@@
static int prealloc_file_range(struct inode *inode, u64 start, u64 end,
inode->i_ctime = CURRENT_TIME;
BTRFS_I(inode)->flags |= BTRFS_INODE_PREALLOC;
if (!(mode & FALLOC_FL_KEEP_SIZE) &&
- cur_offset > inode->i_size) {
+ (actual_len > inode->i_size) &&
+ (cur_offset > inode->i_size)) {
+
if (cur_offset > actual_len)
i_size = actual_len;
else