]> Git Repo - linux.git/commitdiff
fs/ntfs3: Correct mode for label entry inside /proc/fs/ntfs3/
authorKonstantin Komarov <[email protected]>
Fri, 30 Jun 2023 11:23:07 +0000 (15:23 +0400)
committerKonstantin Komarov <[email protected]>
Sun, 2 Jul 2023 20:21:30 +0000 (00:21 +0400)
Suggested-by: Dan Carpenter <[email protected]>
Signed-off-by: Konstantin Komarov <[email protected]>
fs/ntfs3/super.c

index e36769eac7de087fb6330c24bae4b6c616c5331c..1a02072b6b0e166a2d23c6aeb340ae121f1bbe22 100644 (file)
@@ -1548,11 +1548,12 @@ load_root:
        /* Create /proc/fs/ntfs3/.. */
        if (proc_info_root) {
                struct proc_dir_entry *e = proc_mkdir(sb->s_id, proc_info_root);
+               static_assert((S_IRUGO | S_IWUSR) == 0644);
                if (e) {
-                       proc_create_data("volinfo", S_IFREG | S_IRUGO, e,
+                       proc_create_data("volinfo", S_IRUGO, e,
                                         &ntfs3_volinfo_fops, sb);
-                       proc_create_data("label", S_IFREG | S_IRUGO | S_IWUGO,
-                                        e, &ntfs3_label_fops, sb);
+                       proc_create_data("label", S_IRUGO | S_IWUSR, e,
+                                        &ntfs3_label_fops, sb);
                        sbi->procdir = e;
                }
        }
This page took 0.060114 seconds and 4 git commands to generate.