Skip to content

Commit

Permalink
lxcfs_read: added check for cgroup_is_enabled
Browse files Browse the repository at this point in the history
Signed-off-by: Devon Schwartz <[email protected]>
  • Loading branch information
DevonSchwartz committed May 3, 2024
1 parent 0cb15be commit c037ad8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lxcfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,7 @@ static int lxcfs_read(const char *path, char *buf, size_t size, off_t offset,

type = file_info_type(fi);

if (LXCFS_TYPE_CGROUP(type)) {
if (cgroup_is_enabled && LXCFS_TYPE_CGROUP(type)) {
up_users();
ret = do_cg_read(path, buf, size, offset, fi);
down_users();
Expand Down

0 comments on commit c037ad8

Please sign in to comment.