diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-10-26 17:04:20 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-10-26 17:04:20 +0200 |
commit | 601c5c2ee98313f96ec40b4dcc8d7303afff787c (patch) | |
tree | 4cdf5f325c11c1f2588695fd6d9b976d8c488092 | |
parent | 4ed590271a65b0fbe3eb1cf828ad5af16603c8ce (diff) | |
parent | 6c2838fbdedb9b72a81c931d49e56b229b6cdbca (diff) | |
download | linux-601c5c2ee98313f96ec40b4dcc8d7303afff787c.tar.bz2 |
Merge tag 'ceph-for-4.14-rc7' of git://github.com/ceph/ceph-client
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()
-rw-r--r-- | fs/ceph/caps.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index 157fe59fbabe..1978a8cb1cb1 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c @@ -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; } @@ -2008,8 +2009,10 @@ retry: 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); |