Lines Matching refs:na
126 ntfs_attr *na; in ntfs_fuse_getstat() local
184 na = ntfs_attr_open(ni, AT_INDEX_ALLOCATION, in ntfs_fuse_getstat()
186 if (na) { in ntfs_fuse_getstat()
187 ni->data_size = na->data_size; in ntfs_fuse_getstat()
188 ni->allocated_size = na->allocated_size; in ntfs_fuse_getstat()
190 ntfs_attr_close(na); in ntfs_fuse_getstat()
219 na = ntfs_attr_open(ni, AT_DATA, AT_UNNAMED, 0); in ntfs_fuse_getstat()
220 if (!na) { in ntfs_fuse_getstat()
227 if (na->data_size == 0) in ntfs_fuse_getstat()
230 if (na->data_size == 1) in ntfs_fuse_getstat()
237 if ((u64)na->data_size <= sizeof(INTX_FILE_TYPES) in ntfs_fuse_getstat()
239 && (u64)na->data_size > in ntfs_fuse_getstat()
244 (INTX_FILE*)ntfs_malloc(na->data_size); in ntfs_fuse_getstat()
247 ntfs_attr_close(na); in ntfs_fuse_getstat()
250 if (ntfs_attr_pread(na, 0, na->data_size, in ntfs_fuse_getstat()
251 intx_file) != na->data_size) { in ntfs_fuse_getstat()
254 ntfs_attr_close(na); in ntfs_fuse_getstat()
258 na->data_size == (s64)offsetof( in ntfs_fuse_getstat()
267 na->data_size == (s64)offsetof( in ntfs_fuse_getstat()
283 (na->data_size - in ntfs_fuse_getstat()
291 ntfs_attr_close(na); in ntfs_fuse_getstat()
300 ntfs_attr_close(na); in ntfs_fuse_getstat()
366 ntfs_attr *na = NULL; in ntfs_fuse_readlink() local
424 na = ntfs_attr_open(ni, AT_DATA, AT_UNNAMED, 0); in ntfs_fuse_readlink()
425 if (!na) { in ntfs_fuse_readlink()
429 if ((size_t)na->data_size <= sizeof(INTX_FILE_TYPES)) { in ntfs_fuse_readlink()
433 if ((size_t)na->data_size > sizeof(INTX_FILE_TYPES) + in ntfs_fuse_readlink()
439 intx_file = (INTX_FILE*)ntfs_malloc(na->data_size); in ntfs_fuse_readlink()
444 if (ntfs_attr_pread(na, 0, na->data_size, intx_file) != na->data_size) { in ntfs_fuse_readlink()
454 if (ntfs_ucstombs(intx_file->target, (na->data_size - in ntfs_fuse_readlink()
463 if (na) in ntfs_fuse_readlink()
464 ntfs_attr_close(na); in ntfs_fuse_readlink()
483 ntfs_attr *na = NULL; in ntfs_fuse_read() local
510 na = ntfs_attr_open(ni, AT_DATA, AT_UNNAMED, 0); in ntfs_fuse_read()
511 if (!na) { in ntfs_fuse_read()
515 max_read = na->data_size; in ntfs_fuse_read()
520 && (na->data_flags & ATTR_IS_ENCRYPTED) in ntfs_fuse_read()
521 && NAttrNonResident(na)) { in ntfs_fuse_read()
522 max_read = ((na->data_size+511) & ~511) + 2; in ntfs_fuse_read()
531 s64 ret = ntfs_attr_pread(na, offset, size, buf + total); in ntfs_fuse_read()
551 if (na) in ntfs_fuse_read()
552 ntfs_attr_close(na); in ntfs_fuse_read()
560 ntfs_attr *na = NULL; in ntfs_fuse_write() local
581 na = ntfs_attr_open(ni, AT_DATA, AT_UNNAMED, 0); in ntfs_fuse_write()
582 if (!na) { in ntfs_fuse_write()
587 s64 ret = ntfs_attr_pwrite(na, offset, size, buf + total); in ntfs_fuse_write()
606 if (na) in ntfs_fuse_write()
607 ntfs_attr_close(na); in ntfs_fuse_write()
1138 ntfs_attr *na = NULL; local
1168 na = ntfs_attr_open(ni, AT_DATA, AT_UNNAMED, 0);
1169 if (!na) {
1175 res = ntfs_attr_pclose(na);
1178 res = ntfs_efs_fixup_attribute(NULL, na);
1186 if (na)
1187 ntfs_attr_close(na);