Skip to content

Commit

Permalink
libceph, ceph: change permission for readonly debugfs entries
Browse files Browse the repository at this point in the history
Remove write permission for debugfs entries which only have readonly
function.

Signed-off-by: Chengguang Xu <[email protected]>
Reviewed-by: Ilya Dryomov <[email protected]>
Signed-off-by: Ilya Dryomov <[email protected]>
  • Loading branch information
Chengguang Xu authored and idryomov committed Apr 2, 2018
1 parent 7ae7a82 commit 11e1478
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions fs/ceph/debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -260,23 +260,23 @@ int ceph_fs_debugfs_init(struct ceph_fs_client *fsc)
goto out;

fsc->debugfs_mdsmap = debugfs_create_file("mdsmap",
0600,
0400,
fsc->client->debugfs_dir,
fsc,
&mdsmap_show_fops);
if (!fsc->debugfs_mdsmap)
goto out;

fsc->debugfs_mds_sessions = debugfs_create_file("mds_sessions",
0600,
0400,
fsc->client->debugfs_dir,
fsc,
&mds_sessions_show_fops);
if (!fsc->debugfs_mds_sessions)
goto out;

fsc->debugfs_mdsc = debugfs_create_file("mdsc",
0600,
0400,
fsc->client->debugfs_dir,
fsc,
&mdsc_show_fops);
Expand All @@ -292,7 +292,7 @@ int ceph_fs_debugfs_init(struct ceph_fs_client *fsc)
goto out;

fsc->debugfs_dentry_lru = debugfs_create_file("dentry_lru",
0600,
0400,
fsc->client->debugfs_dir,
fsc,
&dentry_lru_show_fops);
Expand Down
10 changes: 5 additions & 5 deletions net/ceph/debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -418,39 +418,39 @@ int ceph_debugfs_client_init(struct ceph_client *client)
goto out;

client->monc.debugfs_file = debugfs_create_file("monc",
0600,
0400,
client->debugfs_dir,
client,
&monc_show_fops);
if (!client->monc.debugfs_file)
goto out;

client->osdc.debugfs_file = debugfs_create_file("osdc",
0600,
0400,
client->debugfs_dir,
client,
&osdc_show_fops);
if (!client->osdc.debugfs_file)
goto out;

client->debugfs_monmap = debugfs_create_file("monmap",
0600,
0400,
client->debugfs_dir,
client,
&monmap_show_fops);
if (!client->debugfs_monmap)
goto out;

client->debugfs_osdmap = debugfs_create_file("osdmap",
0600,
0400,
client->debugfs_dir,
client,
&osdmap_show_fops);
if (!client->debugfs_osdmap)
goto out;

client->debugfs_options = debugfs_create_file("client_options",
0600,
0400,
client->debugfs_dir,
client,
&client_options_show_fops);
Expand Down

0 comments on commit 11e1478

Please sign in to comment.