diff options
author | Konstantin Komarov <almaz.alexandrovich@paragon-software.com> | 2022-09-12 18:28:51 +0300 |
---|---|---|
committer | Konstantin Komarov <almaz.alexandrovich@paragon-software.com> | 2022-09-30 17:39:46 +0300 |
commit | 098250db5dfcc01161fd64e9bce5b012280a85b3 (patch) | |
tree | 78da9cfcddb914d7127e22cd36fb7d762f07095a /fs/ntfs3/inode.c | |
parent | bd6ae049b7be4785082e5c3c0a80e8c9e3ff2fc6 (diff) | |
download | lwn-098250db5dfcc01161fd64e9bce5b012280a85b3.tar.gz lwn-098250db5dfcc01161fd64e9bce5b012280a85b3.zip |
fs/ntfs3: Add hidedotfiles option
With this option all files with filename[0] == '.'
will have FILE_ATTRIBUTE_HIDDEN attribute.
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Diffstat (limited to 'fs/ntfs3/inode.c')
-rw-r--r-- | fs/ntfs3/inode.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/ntfs3/inode.c b/fs/ntfs3/inode.c index 51363d4e8636..40b8565815a2 100644 --- a/fs/ntfs3/inode.c +++ b/fs/ntfs3/inode.c @@ -1257,6 +1257,10 @@ struct inode *ntfs_create_inode(struct user_namespace *mnt_userns, fa = FILE_ATTRIBUTE_ARCHIVE; } + /* If option "hidedotfiles" then set hidden attribute for dot files. */ + if (sbi->options->hide_dot_files && name->name[0] == '.') + fa |= FILE_ATTRIBUTE_HIDDEN; + if (!(mode & 0222)) fa |= FILE_ATTRIBUTE_READONLY; |