Skip to content

Commit 3231300

Browse files
ukernelidryomov
authored andcommitted
ceph: fix flush tid comparision
TID of cap flush ack is 64 bits, but ceph_inode_info::flushing_cap_tid is only 16 bits. 16 bits should be plenty to let the cap flush updates pipeline appropriately, but we need to cast in the proper direction when comparing these differently-sized versions. So downcast the 64-bits one to 16 bits. Reflects ceph.git commit a5184cf46a6e867287e24aeb731634828467cd98. Signed-off-by: Yan, Zheng <[email protected]> Reviewed-by: Ilya Dryomov <[email protected]>
1 parent 206c5f6 commit 3231300

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/ceph/caps.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2638,7 +2638,7 @@ static void handle_cap_flush_ack(struct inode *inode, u64 flush_tid,
26382638

26392639
for (i = 0; i < CEPH_CAP_BITS; i++)
26402640
if ((dirty & (1 << i)) &&
2641-
flush_tid == ci->i_cap_flush_tid[i])
2641+
(u16)flush_tid == ci->i_cap_flush_tid[i])
26422642
cleaned |= 1 << i;
26432643

26442644
dout("handle_cap_flush_ack inode %p mds%d seq %d on %s cleaned %s,"

0 commit comments

Comments
 (0)