[<prev] [next>] [day] [month] [year] [list]
Message-ID: <5ce7410b-3715-dabb-0135-139f86546337@paragon-software.com>
Date: Mon, 3 Jul 2023 11:33:42 +0400
From: Konstantin Komarov <almaz.alexandrovich@...agon-software.com>
To: <ntfs3@...ts.linux.dev>
CC: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
<linux-fsdevel@...r.kernel.org>, <dan.carpenter@...aro.org>
Subject: [PATCH] fs/ntfs3: Correct mode for label entry inside /proc/fs/ntfs3/
Suggested-by: Dan Carpenter <dan.carpenter@...aro.org>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@...agon-software.com>
---
fs/ntfs3/super.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/fs/ntfs3/super.c b/fs/ntfs3/super.c
index e36769eac7de..1a02072b6b0e 100644
--- a/fs/ntfs3/super.c
+++ b/fs/ntfs3/super.c
@@ -1548,11 +1548,12 @@ static int ntfs_fill_super(struct super_block
*sb, struct fs_context *fc)
/* 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;
}
}
--
2.34.1
Powered by blists - more mailing lists