Skip to content

Commit

Permalink
Merge tag 'ceph-for-4.14-rc7' of git://github.com/ceph/ceph-client
Browse files Browse the repository at this point in the history
Pull ceph fix from Ilya Dryomov:
 "A small lock imbalance fix, marked for stable"

* tag 'ceph-for-4.14-rc7' of git://github.com/ceph/ceph-client:
  ceph: unlock dangling spinlock in try_flush_caps()
  • Loading branch information
torvalds committed Oct 26, 2017
2 parents 4ed5902 + 6c2838f commit 601c5c2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion fs/ceph/caps.c
Original file line number Diff line number Diff line change
Expand Up @@ -1991,6 +1991,7 @@ static int try_flush_caps(struct inode *inode, u64 *ptid)
retry:
spin_lock(&ci->i_ceph_lock);
if (ci->i_ceph_flags & CEPH_I_NOFLUSH) {
spin_unlock(&ci->i_ceph_lock);
dout("try_flush_caps skipping %p I_NOFLUSH set\n", inode);
goto out;
}
Expand All @@ -2008,8 +2009,10 @@ static int try_flush_caps(struct inode *inode, u64 *ptid)
mutex_lock(&session->s_mutex);
goto retry;
}
if (cap->session->s_state < CEPH_MDS_SESSION_OPEN)
if (cap->session->s_state < CEPH_MDS_SESSION_OPEN) {
spin_unlock(&ci->i_ceph_lock);
goto out;
}

flushing = __mark_caps_flushing(inode, session, true,
&flush_tid, &oldest_flush_tid);
Expand Down

0 comments on commit 601c5c2

Please sign in to comment.