summaryrefslogtreecommitdiffstats
path: root/fs/ceph
diff options
context:
space:
mode:
authorJeff Layton <jlayton@kernel.org>2019-07-05 19:26:29 +0200
committerIlya Dryomov <idryomov@gmail.com>2019-09-16 12:06:24 +0200
commit27b0a392095d30e452772d4ae636150fd7f2172d (patch)
tree215a2b4f6eeae8cf753aa5eb75f4da0eb9572cbd /fs/ceph
parentceph: have __mark_caps_flushing return flush_tid (diff)
downloadlinux-27b0a392095d30e452772d4ae636150fd7f2172d.tar.xz
linux-27b0a392095d30e452772d4ae636150fd7f2172d.zip
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 <jlayton@kernel.org> Reviewed-by: "Yan, Zheng" <zyan@redhat.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph')
-rw-r--r--fs/ceph/caps.c2
1 files changed, 1 insertions, 1 deletions
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);