From d3569114d1d59b072f1a93d4e52f53a51649cf7a Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 4 Jun 2009 15:52:08 -0700 Subject: [PATCH] kclient: fix truncate_pending up in fill_file_bits The pending++ should match up 1:1 with the pending--.. so only inc if we are also going to queue! --- src/kernel/inode.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/kernel/inode.c b/src/kernel/inode.c index fd39f81372e36..3ed15068218c0 100644 --- a/src/kernel/inode.c +++ b/src/kernel/inode.c @@ -368,11 +368,12 @@ int ceph_fill_file_size(struct inode *inode, int issued, dout(10, "truncate_seq %u -> %u\n", ci->i_truncate_seq, truncate_seq); ci->i_truncate_seq = truncate_seq; - ci->i_truncate_pending++; if (issued & (CEPH_CAP_FILE_CACHE|CEPH_CAP_FILE_RD| CEPH_CAP_FILE_WR|CEPH_CAP_FILE_BUFFER| - CEPH_CAP_FILE_EXCL)) + CEPH_CAP_FILE_EXCL)) { + ci->i_truncate_pending++; queue_trunc = 1; + } } } if (ceph_seq_cmp(truncate_seq, ci->i_truncate_seq) >= 0 && -- 2.39.5