summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorKonstantin Komarov <almaz.alexandrovich@paragon-software.com>2023-06-30 15:23:07 +0400
committerKonstantin Komarov <almaz.alexandrovich@paragon-software.com>2023-07-03 00:21:30 +0400
commit44b4494d5c5971dc8f531c8783d90a637e862880 (patch)
tree9faf009bd108ed9b2d0b6575beeb186d4dae76e4 /fs
parent7832e123490ac39f85ab5befc2ceee7b25b03acb (diff)
downloadlinux-stable-44b4494d5c5971dc8f531c8783d90a637e862880.tar.gz
linux-stable-44b4494d5c5971dc8f531c8783d90a637e862880.tar.bz2
linux-stable-44b4494d5c5971dc8f531c8783d90a637e862880.zip
fs/ntfs3: Correct mode for label entry inside /proc/fs/ntfs3/
Suggested-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/ntfs3/super.c7
1 files 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 @@ 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;
}
}