Lines Matching full:ni
73 static int ntfs_read_ea(struct ntfs_inode *ni, struct EA_FULL **ea, in ntfs_read_ea() argument
77 struct ntfs_sb_info *sbi = ni->mi.sbi; in ntfs_read_ea()
89 ni_find_attr(ni, NULL, &le, ATTR_EA_INFO, NULL, 0, NULL, NULL); in ntfs_read_ea()
91 ni_find_attr(ni, attr_info, &le, ATTR_EA, NULL, 0, NULL, NULL); in ntfs_read_ea()
127 err = attr_load_runs_range(ni, ATTR_EA, NULL, 0, &run, 0, size); in ntfs_read_ea()
193 static ssize_t ntfs_list_ea(struct ntfs_inode *ni, char *buffer, in ntfs_list_ea() argument
202 err = ntfs_read_ea(ni, &ea_all, 0, &info); in ntfs_list_ea()
223 ntfs_set_state(ni->mi.sbi, NTFS_DIRTY_ERROR); in ntfs_list_ea()
254 struct ntfs_inode *ni = ntfs_i(inode); in ntfs_get_ea() local
261 if (!(ni->ni_flags & NI_FLAG_EA)) in ntfs_get_ea()
265 ni_lock(ni); in ntfs_get_ea()
274 err = ntfs_read_ea(ni, &ea_all, 0, &info); in ntfs_get_ea()
308 ni_unlock(ni); in ntfs_get_ea()
318 struct ntfs_inode *ni = ntfs_i(inode); in ntfs_set_ea() local
319 struct ntfs_sb_info *sbi = ni->mi.sbi; in ntfs_set_ea()
336 ni_lock(ni); in ntfs_set_ea()
347 err = ntfs_read_ea(ni, &ea_all, add, &info); in ntfs_set_ea()
449 err = ni_insert_resident(ni, sizeof(struct EA_INFO), in ntfs_set_ea()
455 err = ni_insert_resident(ni, 0, ATTR_EA, NULL, 0, NULL, NULL, in ntfs_set_ea()
462 err = attr_set_size(ni, ATTR_EA, NULL, 0, &ea_run, new_sz, &new_sz, in ntfs_set_ea()
468 attr = ni_find_attr(ni, NULL, &le, ATTR_EA_INFO, NULL, 0, NULL, &mi); in ntfs_set_ea()
476 ni_remove_attr_le(ni, attr, mi, le); in ntfs_set_ea()
488 attr = ni_find_attr(ni, NULL, &le, ATTR_EA, NULL, 0, NULL, &mi); in ntfs_set_ea()
496 ni_remove_attr_le(ni, attr, mi, le); in ntfs_set_ea()
498 err = attr_load_runs_range(ni, ATTR_EA, NULL, 0, &ea_run, 0, in ntfs_set_ea()
518 ni->ni_flags |= NI_FLAG_EA; in ntfs_set_ea()
520 ni->ni_flags &= ~NI_FLAG_EA; in ntfs_set_ea()
523 ni->ni_flags |= NI_FLAG_UPDATE_PARENT; in ntfs_set_ea()
526 mark_inode_dirty(&ni->vfs_inode); in ntfs_set_ea()
530 ni_unlock(ni); in ntfs_set_ea()
547 struct ntfs_inode *ni = ntfs_i(inode); in ntfs_get_acl() local
569 ni_lock(ni); in ntfs_get_acl()
573 ni_unlock(ni); in ntfs_get_acl()
730 struct ntfs_inode *ni = ntfs_i(inode); in ntfs_listxattr() local
733 if (!(ni->ni_flags & NI_FLAG_EA)) { in ntfs_listxattr()
738 ni_lock(ni); in ntfs_listxattr()
740 ret = ntfs_list_ea(ni, buffer, size); in ntfs_listxattr()
742 ni_unlock(ni); in ntfs_listxattr()
752 struct ntfs_inode *ni = ntfs_i(inode); in ntfs_getxattr() local
766 *(u8 *)buffer = le32_to_cpu(ni->std_fa); in ntfs_getxattr()
780 *(u32 *)buffer = le32_to_cpu(ni->std_fa); in ntfs_getxattr()
792 if (!is_ntfs3(ni->mi.sbi)) { in ntfs_getxattr()
796 } else if (le32_to_cpu(ni->std_security_id) < in ntfs_getxattr()
802 err = ntfs_get_security_by_id(ni->mi.sbi, ni->std_security_id, in ntfs_getxattr()
811 ni->std_security_id); in ntfs_getxattr()
842 struct ntfs_inode *ni = ntfs_i(inode); in ntfs_setxattr() local
864 ni_lock(ni); in ntfs_setxattr()
865 err = ni_new_attr_flags(ni, new_fa); in ntfs_setxattr()
866 ni_unlock(ni); in ntfs_setxattr()
880 if (ni->std_fa != new_fa) { in ntfs_setxattr()
881 ni->std_fa = new_fa; in ntfs_setxattr()
887 ni->mi.dirty = true; in ntfs_setxattr()
901 if (!is_ntfs3(ni->mi.sbi)) { in ntfs_setxattr()
918 err = ntfs_insert_security(ni->mi.sbi, value, size, in ntfs_setxattr()
923 ni_lock(ni); in ntfs_setxattr()
924 std = ni_std5(ni); in ntfs_setxattr()
928 std->security_id = ni->std_security_id = security_id; in ntfs_setxattr()
930 ni->mi.dirty = true; in ntfs_setxattr()
931 mark_inode_dirty(&ni->vfs_inode); in ntfs_setxattr()
933 ni_unlock(ni); in ntfs_setxattr()
957 struct ntfs_inode *ni = ntfs_i(inode); in ntfs_save_wsl_perm() local
959 ni_lock(ni); in ntfs_save_wsl_perm()
987 ni_unlock(ni); in ntfs_save_wsl_perm()