ceph: remove redundant initialization of variable mds
Subsystems (2)
PATCH 1/1 ceph: remove redundant initialization of variable mds
From: Colin Ian King <[email protected]>
The variable mds is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by Colin Ian King <[email protected]>
--- fs/ceph/debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ceph/debugfs.c +1 -1
@@ -272,7 +272,7 @@ static int mds_sessions_show(struct seq_file *s, void *ptr)struct ceph_mds_client *mdsc = fsc->mdsc;struct ceph_auth_client *ac = fsc->client->monc.auth;struct ceph_options *opt = fsc->client->options; -int mds =-1 ; +int mds;mutex_lock (&mdsc->mutex);
Signature · 1 line
2.27.0
Quoted 17 lines · Colin King
From: Colin Ian King <[email protected]>
The variable mds is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by Colin Ian King <[email protected]>--- fs/ceph/debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/ceph/debugfs.c +0
-0
fs/ceph/debugfs.c static int mds_sessions_show(struct seq_file *s, void *ptr) · line 278
Quoted 8 lines
fs/ceph/debugfs.c +1
-1@@ -272,7 +272,7 @@ static int mds_sessions_show(struct seq_file *s, void *ptr)struct ceph_mds_client *mdsc = fsc->mdsc;struct ceph_auth_client *ac = fsc->client->monc.auth;struct ceph_options *opt = fsc->client->options; -int mds =-1 ; +int mds;mutex_lock (&mdsc->mutex);
Thanks, merged into testing branch.
Signature · 1 line
Jeff Layton <[email protected]>