mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-12 12:25:18 +02:00
xfs: fix scrub stats file permissions
commite610e856b9
upstream. When the kernel is in lockdown mode, debugfs will only show files that are world-readable and cannot be written, mmaped, or used with ioctl. That more or less describes the scrub stats file, except that the permissions are wrong -- they should be 0444, not 0644. You can't write the stats file, so the 0200 makes no sense. Meanwhile, the clear_stats file is only writable, but it got mode 0400 instead of 0200, which would make more sense. Fix both files so that they make sense. Fixes:d7a74cad8f
("xfs: track usage statistics of online fsck") Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Chandan Babu R <chandanbabu@kernel.org> Signed-off-by: Catherine Hoang <catherine.hoang@oracle.com> Acked-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
20bccdb03a
commit
7f0e5af269
|
@ -329,9 +329,9 @@ xchk_stats_register(
|
||||||
if (!cs->cs_debugfs)
|
if (!cs->cs_debugfs)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
debugfs_create_file("stats", 0644, cs->cs_debugfs, cs,
|
debugfs_create_file("stats", 0444, cs->cs_debugfs, cs,
|
||||||
&scrub_stats_fops);
|
&scrub_stats_fops);
|
||||||
debugfs_create_file("clear_stats", 0400, cs->cs_debugfs, cs,
|
debugfs_create_file("clear_stats", 0200, cs->cs_debugfs, cs,
|
||||||
&clear_scrub_stats_fops);
|
&clear_scrub_stats_fops);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user