Skip to content

Commit 267a36b

Browse files
fs/ntfs3: Remove noacsrules
Currently, this option does not work properly. Its use leads to unstable results. If we figure out how to implement it without errors, we will add it later. Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
1 parent c20bc9c commit 267a36b

7 files changed

Lines changed: 1 addition & 49 deletions

File tree

Documentation/filesystems/ntfs3.rst

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -61,17 +61,6 @@ this table marked with no it means default is without **no**.
6161
directories, fmask applies only to files and dmask only to directories.
6262
* - fmask=
6363

64-
* - noacsrules
65-
- "No access rules" mount option sets access rights for files/folders to
66-
777 and owner/group to root. This mount option absorbs all other
67-
permissions.
68-
69-
- Permissions change for files/folders will be reported as successful,
70-
but they will remain 777.
71-
72-
- Owner/group change will be reported as successful, butthey will stay
73-
as root.
74-
7564
* - nohidden
7665
- Files with the Windows-specific HIDDEN (FILE_ATTRIBUTE_HIDDEN) attribute
7766
will not be shown under Linux.

fs/ntfs3/file.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -654,22 +654,12 @@ static long ntfs_fallocate(struct file *file, int mode, loff_t vbo, loff_t len)
654654
int ntfs3_setattr(struct mnt_idmap *idmap, struct dentry *dentry,
655655
struct iattr *attr)
656656
{
657-
struct super_block *sb = dentry->d_sb;
658-
struct ntfs_sb_info *sbi = sb->s_fs_info;
659657
struct inode *inode = d_inode(dentry);
660658
struct ntfs_inode *ni = ntfs_i(inode);
661659
u32 ia_valid = attr->ia_valid;
662660
umode_t mode = inode->i_mode;
663661
int err;
664662

665-
if (sbi->options->noacsrules) {
666-
/* "No access rules" - Force any changes of time etc. */
667-
attr->ia_valid |= ATTR_FORCE;
668-
/* and disable for editing some attributes. */
669-
attr->ia_valid &= ~(ATTR_UID | ATTR_GID | ATTR_MODE);
670-
ia_valid = attr->ia_valid;
671-
}
672-
673663
err = setattr_prepare(idmap, dentry, attr);
674664
if (err)
675665
goto out;
@@ -1153,7 +1143,6 @@ const struct inode_operations ntfs_file_inode_operations = {
11531143
.getattr = ntfs_getattr,
11541144
.setattr = ntfs3_setattr,
11551145
.listxattr = ntfs_listxattr,
1156-
.permission = ntfs_permission,
11571146
.get_inode_acl = ntfs_get_acl,
11581147
.set_acl = ntfs_set_acl,
11591148
.fiemap = ntfs_fiemap,

fs/ntfs3/inode.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2070,7 +2070,6 @@ const struct inode_operations ntfs_link_inode_operations = {
20702070
.get_link = ntfs_get_link,
20712071
.setattr = ntfs3_setattr,
20722072
.listxattr = ntfs_listxattr,
2073-
.permission = ntfs_permission,
20742073
};
20752074

20762075
const struct address_space_operations ntfs_aops = {

fs/ntfs3/namei.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,6 @@ const struct inode_operations ntfs_dir_inode_operations = {
607607
.rmdir = ntfs_rmdir,
608608
.mknod = ntfs_mknod,
609609
.rename = ntfs_rename,
610-
.permission = ntfs_permission,
611610
.get_inode_acl = ntfs_get_acl,
612611
.set_acl = ntfs_set_acl,
613612
.setattr = ntfs3_setattr,

fs/ntfs3/ntfs_fs.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ struct ntfs_mount_options {
100100
unsigned hide_dot_files : 1; /* Set hidden flag on dot files. */
101101
unsigned windows_names : 1; /* Disallow names forbidden by Windows. */
102102
unsigned force : 1; /* RW mount dirty volume. */
103-
unsigned noacsrules : 1; /* Exclude acs rules. */
104103
unsigned prealloc : 1; /* Preallocate space when file is growing. */
105104
unsigned nocase : 1; /* case insensitive. */
106105
};
@@ -870,8 +869,6 @@ int ntfs_init_acl(struct mnt_idmap *idmap, struct inode *inode,
870869
#endif
871870

872871
int ntfs_acl_chmod(struct mnt_idmap *idmap, struct dentry *dentry);
873-
int ntfs_permission(struct mnt_idmap *idmap, struct inode *inode,
874-
int mask);
875872
ssize_t ntfs_listxattr(struct dentry *dentry, char *buffer, size_t size);
876873
extern const struct xattr_handler *ntfs_xattr_handlers[];
877874

fs/ntfs3/super.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,6 @@ enum Opt {
253253
Opt_acl,
254254
Opt_iocharset,
255255
Opt_prealloc,
256-
Opt_noacsrules,
257256
Opt_nocase,
258257
Opt_err,
259258
};
@@ -274,7 +273,6 @@ static const struct fs_parameter_spec ntfs_fs_parameters[] = {
274273
fsparam_flag_no("acl", Opt_acl),
275274
fsparam_flag_no("showmeta", Opt_showmeta),
276275
fsparam_flag_no("prealloc", Opt_prealloc),
277-
fsparam_flag_no("acsrules", Opt_noacsrules),
278276
fsparam_flag_no("nocase", Opt_nocase),
279277
fsparam_string("iocharset", Opt_iocharset),
280278
{}
@@ -387,9 +385,6 @@ static int ntfs_fs_parse_param(struct fs_context *fc,
387385
case Opt_prealloc:
388386
opts->prealloc = result.negated ? 0 : 1;
389387
break;
390-
case Opt_noacsrules:
391-
opts->noacsrules = result.negated ? 1 : 0;
392-
break;
393388
case Opt_nocase:
394389
opts->nocase = result.negated ? 1 : 0;
395390
break;
@@ -572,8 +567,6 @@ static int ntfs_show_options(struct seq_file *m, struct dentry *root)
572567
seq_puts(m, ",hide_dot_files");
573568
if (opts->force)
574569
seq_puts(m, ",force");
575-
if (opts->noacsrules)
576-
seq_puts(m, ",noacsrules");
577570
if (opts->prealloc)
578571
seq_puts(m, ",prealloc");
579572
if (sb->s_flags & SB_POSIXACL)
@@ -791,7 +784,7 @@ static int ntfs_init_from_boot(struct super_block *sb, u32 sector_size,
791784
if (boot_sector_size != sector_size) {
792785
ntfs_warn(
793786
sb,
794-
"Different NTFS' sector size (%u) and media sector size (%u)",
787+
"Different NTFS sector size (%u) and media sector size (%u)",
795788
boot_sector_size, sector_size);
796789
dev_size += sector_size - 1;
797790
}

fs/ntfs3/xattr.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -711,20 +711,6 @@ int ntfs_acl_chmod(struct mnt_idmap *idmap, struct dentry *dentry)
711711
return posix_acl_chmod(idmap, dentry, inode->i_mode);
712712
}
713713

714-
/*
715-
* ntfs_permission - inode_operations::permission
716-
*/
717-
int ntfs_permission(struct mnt_idmap *idmap, struct inode *inode,
718-
int mask)
719-
{
720-
if (ntfs_sb(inode->i_sb)->options->noacsrules) {
721-
/* "No access rules" mode - Allow all changes. */
722-
return 0;
723-
}
724-
725-
return generic_permission(idmap, inode, mask);
726-
}
727-
728714
/*
729715
* ntfs_listxattr - inode_operations::listxattr
730716
*/

0 commit comments

Comments
 (0)