projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d15f9d6
)
ceph: get inode size for each append write
author
Yan, Zheng
<zyan@redhat.com>
Mon, 7 Sep 2015 03:35:01 +0000
(11:35 +0800)
committer
Ilya Dryomov
<idryomov@gmail.com>
Wed, 9 Sep 2015 06:52:29 +0000
(09:52 +0300)
Signed-off-by: Yan, Zheng <zyan@redhat.com>
fs/ceph/file.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/ceph/file.c
b/fs/ceph/file.c
index 90ec110b8400c5ee95a5fb49f688e0b63893bab1..0c62868b5c561b37fa866b68bbe34f3ffb1fd6a6 100644
(file)
--- a/
fs/ceph/file.c
+++ b/
fs/ceph/file.c
@@
-952,6
+952,12
@@
static ssize_t ceph_write_iter(struct kiocb *iocb, struct iov_iter *from)
/* We can write back this queue in page reclaim */
current->backing_dev_info = inode_to_bdi(inode);
+ if (iocb->ki_flags & IOCB_APPEND) {
+ err = ceph_do_getattr(inode, CEPH_STAT_CAP_SIZE, false);
+ if (err < 0)
+ goto out;
+ }
+
err = generic_write_checks(iocb, from);
if (err <= 0)
goto out;