Commit 27b0a392 authored by Jeff Layton's avatar Jeff Layton Committed by Ilya Dryomov

ceph: remove unneeded test in try_flush_caps

cap->session is always non-NULL, so we can just do a single test for
equality w/o testing explicitly for a NULL pointer.
Signed-off-by: default avatarJeff Layton <jlayton@kernel.org>
Reviewed-by: default avatar"Yan, Zheng" <zyan@redhat.com>
Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
parent 9f3345d8
......@@ -2114,7 +2114,7 @@ static int try_flush_caps(struct inode *inode, u64 *ptid)
struct ceph_cap *cap = ci->i_auth_cap;
int delayed;
if (!session || session != cap->session) {
if (session != cap->session) {
spin_unlock(&ci->i_ceph_lock);
if (session)
mutex_unlock(&session->s_mutex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment