xattr.c (d0e99511834b6828c960e978d9a8cb6e5731250d) | xattr.c (13e83a4923bea7c4f2f6714030cb7e56d20ef7e5) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * 4 * Copyright (C) 2019-2021 Paragon Software GmbH, All rights reserved. 5 * 6 */ 7 8#include <linux/fs.h> --- 638 unchanged lines hidden (view full) --- 647 kfree(value); 648 649 return err; 650} 651 652/* 653 * ntfs_set_acl - inode_operations::set_acl 654 */ | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * 4 * Copyright (C) 2019-2021 Paragon Software GmbH, All rights reserved. 5 * 6 */ 7 8#include <linux/fs.h> --- 638 unchanged lines hidden (view full) --- 647 kfree(value); 648 649 return err; 650} 651 652/* 653 * ntfs_set_acl - inode_operations::set_acl 654 */ |
655int ntfs_set_acl(struct user_namespace *mnt_userns, struct dentry *dentry, | 655int ntfs_set_acl(struct mnt_idmap *idmap, struct dentry *dentry, |
656 struct posix_acl *acl, int type) 657{ | 656 struct posix_acl *acl, int type) 657{ |
658 struct user_namespace *mnt_userns = mnt_idmap_owner(idmap); 659 |
|
658 return ntfs_set_acl_ex(mnt_userns, d_inode(dentry), acl, type, false); 659} 660 661/* 662 * ntfs_init_acl - Initialize the ACLs of a new inode. 663 * 664 * Called from ntfs_create_inode(). 665 */ --- 26 unchanged lines hidden (view full) --- 692 693 return err; 694} 695#endif 696 697/* 698 * ntfs_acl_chmod - Helper for ntfs3_setattr(). 699 */ | 660 return ntfs_set_acl_ex(mnt_userns, d_inode(dentry), acl, type, false); 661} 662 663/* 664 * ntfs_init_acl - Initialize the ACLs of a new inode. 665 * 666 * Called from ntfs_create_inode(). 667 */ --- 26 unchanged lines hidden (view full) --- 694 695 return err; 696} 697#endif 698 699/* 700 * ntfs_acl_chmod - Helper for ntfs3_setattr(). 701 */ |
700int ntfs_acl_chmod(struct user_namespace *mnt_userns, struct dentry *dentry) | 702int ntfs_acl_chmod(struct mnt_idmap *idmap, struct dentry *dentry) |
701{ 702 struct inode *inode = d_inode(dentry); 703 struct super_block *sb = inode->i_sb; 704 705 if (!(sb->s_flags & SB_POSIXACL)) 706 return 0; 707 708 if (S_ISLNK(inode->i_mode)) 709 return -EOPNOTSUPP; 710 | 703{ 704 struct inode *inode = d_inode(dentry); 705 struct super_block *sb = inode->i_sb; 706 707 if (!(sb->s_flags & SB_POSIXACL)) 708 return 0; 709 710 if (S_ISLNK(inode->i_mode)) 711 return -EOPNOTSUPP; 712 |
711 return posix_acl_chmod(mnt_userns, dentry, inode->i_mode); | 713 return posix_acl_chmod(idmap, dentry, inode->i_mode); |
712} 713 714/* 715 * ntfs_permission - inode_operations::permission 716 */ 717int ntfs_permission(struct user_namespace *mnt_userns, struct inode *inode, 718 int mask) 719{ --- 324 unchanged lines hidden --- | 714} 715 716/* 717 * ntfs_permission - inode_operations::permission 718 */ 719int ntfs_permission(struct user_namespace *mnt_userns, struct inode *inode, 720 int mask) 721{ --- 324 unchanged lines hidden --- |