All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] f2fs: convert S_IRUGO to 0444
@ 2021-08-14 10:37 ` Yangtao Li
  0 siblings, 0 replies; 19+ messages in thread
From: Yangtao Li @ 2021-08-14 10:37 UTC (permalink / raw)
  To: jaegeuk, chao; +Cc: linux-f2fs-devel, linux-kernel, Yangtao Li

To fix:
WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 fs/f2fs/debug.c | 2 +-
 fs/f2fs/sysfs.c | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/fs/f2fs/debug.c b/fs/f2fs/debug.c
index 833325038ef3..542c20e9ea0c 100644
--- a/fs/f2fs/debug.c
+++ b/fs/f2fs/debug.c
@@ -611,7 +611,7 @@ void __init f2fs_create_root_stats(void)
 #ifdef CONFIG_DEBUG_FS
 	f2fs_debugfs_root = debugfs_create_dir("f2fs", NULL);
 
-	debugfs_create_file("status", S_IRUGO, f2fs_debugfs_root, NULL,
+	debugfs_create_file("status", 0444, f2fs_debugfs_root, NULL,
 			    &stat_fops);
 #endif
 }
diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c
index 6642246206bd..204de4c2c818 100644
--- a/fs/f2fs/sysfs.c
+++ b/fs/f2fs/sysfs.c
@@ -1213,13 +1213,13 @@ int f2fs_register_sysfs(struct f2fs_sb_info *sbi)
 		sbi->s_proc = proc_mkdir(sb->s_id, f2fs_proc_root);
 
 	if (sbi->s_proc) {
-		proc_create_single_data("segment_info", S_IRUGO, sbi->s_proc,
+		proc_create_single_data("segment_info", 0444, sbi->s_proc,
 				segment_info_seq_show, sb);
-		proc_create_single_data("segment_bits", S_IRUGO, sbi->s_proc,
+		proc_create_single_data("segment_bits", 0444, sbi->s_proc,
 				segment_bits_seq_show, sb);
-		proc_create_single_data("iostat_info", S_IRUGO, sbi->s_proc,
+		proc_create_single_data("iostat_info", 0444, sbi->s_proc,
 				iostat_info_seq_show, sb);
-		proc_create_single_data("victim_bits", S_IRUGO, sbi->s_proc,
+		proc_create_single_data("victim_bits", 0444, sbi->s_proc,
 				victim_bits_seq_show, sb);
 	}
 	return 0;
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 19+ messages in thread
[parent not found: <AEYAigA8D7ZftrI0MRYeIqoY.3.1629098634558.Hmail.frank.li@vivo.com>]

end of thread, other threads:[~2021-08-20  9:13 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-14 10:37 [PATCH] f2fs: convert S_IRUGO to 0444 Yangtao Li
2021-08-14 10:37 ` [f2fs-dev] " Yangtao Li
2021-08-14 10:37 ` [PATCH v6] f2fs: introduce /sys/fs/f2fs/<disk>/fsck_stack node Yangtao Li
2021-08-14 10:37   ` [f2fs-dev] " Yangtao Li
2021-08-16  2:53   ` Chao Yu
2021-08-16  2:53     ` [f2fs-dev] " Chao Yu
2021-08-16  4:02     ` 李扬韬
2021-08-16  4:02       ` [f2fs-dev] " 李扬韬
2021-08-16  6:41       ` Chao Yu
2021-08-16  6:41         ` [f2fs-dev] " Chao Yu
2021-08-16  6:53         ` 李扬韬
2021-08-16  6:53           ` [f2fs-dev] " 李扬韬
2021-08-17  0:27         ` Jaegeuk Kim
2021-08-17  0:27           ` Jaegeuk Kim
2021-08-20  9:12           ` Chao Yu
2021-08-20  9:12             ` [f2fs-dev] " Chao Yu
2021-08-16  1:45 ` [PATCH] f2fs: convert S_IRUGO to 0444 Chao Yu
2021-08-16  1:45   ` [f2fs-dev] " Chao Yu
     [not found] <AEYAigA8D7ZftrI0MRYeIqoY.3.1629098634558.Hmail.frank.li@vivo.com>
2021-08-19  8:04 ` [PATCH v6] f2fs: introduce /sys/fs/f2fs/<disk>/fsck_stack node Chao Yu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.