Skip to content

Commit 44b4494

Browse files
fs/ntfs3: Correct mode for label entry inside /proc/fs/ntfs3/
Suggested-by: Dan Carpenter <[email protected]> Signed-off-by: Konstantin Komarov <[email protected]>
1 parent 7832e12 commit 44b4494

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

fs/ntfs3/super.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1548,11 +1548,12 @@ static int ntfs_fill_super(struct super_block *sb, struct fs_context *fc)
15481548
/* Create /proc/fs/ntfs3/.. */
15491549
if (proc_info_root) {
15501550
struct proc_dir_entry *e = proc_mkdir(sb->s_id, proc_info_root);
1551+
static_assert((S_IRUGO | S_IWUSR) == 0644);
15511552
if (e) {
1552-
proc_create_data("volinfo", S_IFREG | S_IRUGO, e,
1553+
proc_create_data("volinfo", S_IRUGO, e,
15531554
&ntfs3_volinfo_fops, sb);
1554-
proc_create_data("label", S_IFREG | S_IRUGO | S_IWUGO,
1555-
e, &ntfs3_label_fops, sb);
1555+
proc_create_data("label", S_IRUGO | S_IWUSR, e,
1556+
&ntfs3_label_fops, sb);
15561557
sbi->procdir = e;
15571558
}
15581559
}

0 commit comments

Comments
 (0)