Message ID | 20190725111746.10393-7-jlayton@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | ceph: minor cleanup patches for v5.4 | expand |
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 @@ 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);
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 <jlayton@kernel.org> --- fs/ceph/caps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)