summaryrefslogtreecommitdiffstats
path: root/fs/ceph/file.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2017-06-08 10:12:12 +0200
committerIngo Molnar <mingo@kernel.org>2017-06-08 10:12:12 +0200
commita5506c46a4d249a422b0eca537026fc7a1ac78b5 (patch)
tree6a463b0e6ac0ca16eb195a4f49a22afb1403337f /fs/ceph/file.c
parent36cc2b9222b5106de34085c4dd8635ac67ef5cba (diff)
parentcc1582c231ea041fbc68861dfaf957eaf902b829 (diff)
downloadlinux-a5506c46a4d249a422b0eca537026fc7a1ac78b5.tar.bz2
Merge branch 'perf/urgent' into perf/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'fs/ceph/file.c')
-rw-r--r--fs/ceph/file.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/ceph/file.c b/fs/ceph/file.c
index 3fdde0b283c9..29308a80d66f 100644
--- a/fs/ceph/file.c
+++ b/fs/ceph/file.c
@@ -1671,8 +1671,12 @@ static long ceph_fallocate(struct file *file, int mode,
}
size = i_size_read(inode);
- if (!(mode & FALLOC_FL_KEEP_SIZE))
+ if (!(mode & FALLOC_FL_KEEP_SIZE)) {
endoff = offset + length;
+ ret = inode_newsize_ok(inode, endoff);
+ if (ret)
+ goto unlock;
+ }
if (fi->fmode & CEPH_FILE_MODE_LAZY)
want = CEPH_CAP_FILE_BUFFER | CEPH_CAP_FILE_LAZYIO;