diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-10-26 11:04:20 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-10-26 11:04:20 -0400 |
commit | 601c5c2ee98313f96ec40b4dcc8d7303afff787c (patch) | |
tree | 4cdf5f325c11c1f2588695fd6d9b976d8c488092 /fs | |
parent | 4ed590271a65b0fbe3eb1cf828ad5af16603c8ce (diff) | |
parent | 6c2838fbdedb9b72a81c931d49e56b229b6cdbca (diff) |
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()
Diffstat (limited to 'fs')
-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) | |||
1991 | retry: | 1991 | retry: |
1992 | spin_lock(&ci->i_ceph_lock); | 1992 | spin_lock(&ci->i_ceph_lock); |
1993 | if (ci->i_ceph_flags & CEPH_I_NOFLUSH) { | 1993 | if (ci->i_ceph_flags & CEPH_I_NOFLUSH) { |
1994 | spin_unlock(&ci->i_ceph_lock); | ||
1994 | dout("try_flush_caps skipping %p I_NOFLUSH set\n", inode); | 1995 | dout("try_flush_caps skipping %p I_NOFLUSH set\n", inode); |
1995 | goto out; | 1996 | goto out; |
1996 | } | 1997 | } |
@@ -2008,8 +2009,10 @@ retry: | |||
2008 | mutex_lock(&session->s_mutex); | 2009 | mutex_lock(&session->s_mutex); |
2009 | goto retry; | 2010 | goto retry; |
2010 | } | 2011 | } |
2011 | if (cap->session->s_state < CEPH_MDS_SESSION_OPEN) | 2012 | if (cap->session->s_state < CEPH_MDS_SESSION_OPEN) { |
2013 | spin_unlock(&ci->i_ceph_lock); | ||
2012 | goto out; | 2014 | goto out; |
2015 | } | ||
2013 | 2016 | ||
2014 | flushing = __mark_caps_flushing(inode, session, true, | 2017 | flushing = __mark_caps_flushing(inode, session, true, |
2015 | &flush_tid, &oldest_flush_tid); | 2018 | &flush_tid, &oldest_flush_tid); |