ceph:Remove unneeded locking/unlocking of session mutex in the function drop_leases
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 19 lines · Nicholas Krause
This removes the unneeded lock/unlocking of the session mutex as part of the structure pointer s of type
ceph_mds_sessionas this locking/unlocking of the session mutex does not protect any critical region and thus only wastes time in acquiring and unlocking this mutex in the functiondrop_leases.Signed-off-by Nicholas Krause <[email protected]>---
fs/ceph/mds_client.c| 2 --1 file changed, 2 deletions(-)fs/ceph/mds_client.c +0
-0
fs/ceph/mds_client.c static void drop_leases(struct ceph_mds_client *mdsc) · line 3327
Quoted 8 lines
fs/ceph/mds_client.c +0
-2@@ -3322,8 +3322,6 @@ static void drop_leases(struct ceph_mds_client *mdsc)if (!s)continue ;mutex_unlock (&mdsc->mutex); -mutex_lock (&s->s_mutex); -mutex_unlock (&s->s_mutex);ceph_put_mds_session (s);mutex_lock (&mdsc->mutex); }
the lock/unlock waits any code in critical region to exit
Quoted 3 lines
Signature · 1 line
2.1.4