]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ceph: move inode to proper flushing list when auth MDS changes
authorYan, Zheng <zheng.z.yan@intel.com>
Fri, 31 May 2013 08:40:24 +0000 (16:40 +0800)
committerSage Weil <sage@inktank.com>
Mon, 17 Jun 2013 02:51:53 +0000 (19:51 -0700)
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Reviewed-by: Sage Weil <sage@inktank.com>
fs/ceph/caps.c

index 790f88b15daf11f696f352f331f2e8e410b182e8..9a5ccc9e0d62ec7e7b00ca9ecb52164bf2825f89 100644 (file)
@@ -1982,8 +1982,15 @@ static void kick_flushing_inode_caps(struct ceph_mds_client *mdsc,
        cap = ci->i_auth_cap;
        dout("kick_flushing_inode_caps %p flushing %s flush_seq %lld\n", inode,
             ceph_cap_string(ci->i_flushing_caps), ci->i_cap_flush_seq);
+
        __ceph_flush_snaps(ci, &session, 1);
+
        if (ci->i_flushing_caps) {
+               spin_lock(&mdsc->cap_dirty_lock);
+               list_move_tail(&ci->i_flushing_item,
+                              &cap->session->s_cap_flushing);
+               spin_unlock(&mdsc->cap_dirty_lock);
+
                delayed = __send_cap(mdsc, cap, CEPH_CAP_OP_FLUSH,
                                     __ceph_caps_used(ci),
                                     __ceph_caps_wanted(ci),