From: Jeff Layton Date: Fri, 5 Jul 2019 17:26:29 +0000 (-0400) Subject: ceph: remove unneeded test in try_flush_caps X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=27b0a392095d30e452772d4ae636150fd7f2172d;p=openwrt%2Fstaging%2Fblogic.git 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: Jeff Layton Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov --- diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index 6b8300d72cac..bb91abaf7559 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c @@ -2114,7 +2114,7 @@ retry_locked: 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);