[6/8] ceph: remove unneeded test in try_flush_caps
diff mbox series

Message ID 20190725111746.10393-7-jlayton@kernel.org
State New
Headers show
Series
  • ceph: minor cleanup patches for v5.4
Related show

Commit Message

Jeff Layton July 25, 2019, 11:17 a.m. UTC
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(-)

Patch
diff mbox series

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);