aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ceph/inode.c')
-rw-r--r--fs/ceph/inode.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
index a4f573ab232..af85f2de2f7 100644
--- a/fs/ceph/inode.c
+++ b/fs/ceph/inode.c
@@ -416,9 +416,17 @@ int ceph_fill_file_size(struct inode *inode, int issued,
416 dout("truncate_seq %u -> %u\n", 416 dout("truncate_seq %u -> %u\n",
417 ci->i_truncate_seq, truncate_seq); 417 ci->i_truncate_seq, truncate_seq);
418 ci->i_truncate_seq = truncate_seq; 418 ci->i_truncate_seq = truncate_seq;
419 if (issued & (CEPH_CAP_FILE_CACHE|CEPH_CAP_FILE_RD| 419 /*
420 * If we hold relevant caps, or in the case where we're
421 * not the only client referencing this file and we
422 * don't hold those caps, then we need to check whether
423 * the file is either opened or mmaped
424 */
425 if ((issued & (CEPH_CAP_FILE_CACHE|CEPH_CAP_FILE_RD|
420 CEPH_CAP_FILE_WR|CEPH_CAP_FILE_BUFFER| 426 CEPH_CAP_FILE_WR|CEPH_CAP_FILE_BUFFER|
421 CEPH_CAP_FILE_EXCL)) { 427 CEPH_CAP_FILE_EXCL)) ||
428 mapping_mapped(inode->i_mapping) ||
429 __ceph_caps_file_wanted(ci)) {
422 ci->i_truncate_pending++; 430 ci->i_truncate_pending++;
423 queue_trunc = 1; 431 queue_trunc = 1;
424 } 432 }