Lines Matching refs:ctx

421  * @ctx:	initialized attribute search context
424 * search context @ctx and check if any of the names are in the $Extend system
432 static int ntfs_is_extended_system_file(ntfs_attr_search_ctx *ctx)
437 ntfs_attr_reinit_search_ctx(ctx);
440 nr_links = le16_to_cpu(ctx->mrec->link_count);
444 ctx))) {
446 ATTR_RECORD *attr = ctx->attr;
455 if (p < (u8*)ctx->mrec || (u8*)p > (u8*)ctx->mrec +
456 le32_to_cpu(ctx->mrec->bytes_in_use)) {
458 ntfs_error(ctx->ntfs_ino->vol->sb, "Corrupt file name "
463 ntfs_error(ctx->ntfs_ino->vol->sb, "Non-resident file "
468 ntfs_error(ctx->ntfs_ino->vol->sb, "File name with "
474 ntfs_error(ctx->ntfs_ino->vol->sb, "Unindexed file "
490 ntfs_error(ctx->ntfs_ino->vol->sb, "Inode hard link count "
532 ntfs_attr_search_ctx *ctx;
555 ctx = ntfs_attr_get_search_ctx(ni, m);
556 if (!ctx) {
617 ctx);
630 a = ctx->attr;
634 (u8 *)ctx->mrec + vol->mft_record_size) {
665 ntfs_attr_reinit_search_ctx(ctx);
666 err = ntfs_attr_lookup(AT_ATTRIBUTE_LIST, NULL, 0, 0, 0, NULL, 0, ctx);
678 a = ctx->attr;
743 (u8*)ctx->mrec + vol->mft_record_size) {
767 ntfs_attr_reinit_search_ctx(ctx);
769 0, NULL, 0, ctx);
780 a = ctx->attr;
815 if (ir_end > (u8*)ctx->mrec + vol->mft_record_size) {
885 ntfs_attr_put_search_ctx(ctx);
888 ctx = NULL;
893 ntfs_attr_reinit_search_ctx(ctx);
895 CASE_SENSITIVE, 0, NULL, 0, ctx);
907 a = ctx->attr;
955 ntfs_attr_put_search_ctx(ctx);
958 ctx = NULL;
991 ntfs_attr_reinit_search_ctx(ctx);
999 err = ntfs_attr_lookup(AT_DATA, NULL, 0, 0, 0, NULL, 0, ctx);
1023 if (ntfs_is_extended_system_file(ctx) > 0)
1030 a = ctx->attr;
1130 ntfs_attr_put_search_ctx(ctx);
1133 ctx = NULL;
1165 if (ctx)
1166 ntfs_attr_put_search_ctx(ctx);
1206 ntfs_attr_search_ctx *ctx;
1233 ctx = ntfs_attr_get_search_ctx(base_ni, m);
1234 if (!ctx) {
1240 CASE_SENSITIVE, 0, NULL, 0, ctx);
1243 a = ctx->attr;
1408 ntfs_attr_put_search_ctx(ctx);
1417 if (ctx)
1418 ntfs_attr_put_search_ctx(ctx);
1473 ntfs_attr_search_ctx *ctx;
1498 ctx = ntfs_attr_get_search_ctx(base_ni, m);
1499 if (!ctx) {
1505 CASE_SENSITIVE, 0, NULL, 0, ctx);
1512 a = ctx->attr;
1537 if (ir_end > (u8*)ctx->mrec + vol->mft_record_size) {
1588 ntfs_attr_put_search_ctx(ctx);
1591 ctx = NULL;
1596 ntfs_attr_reinit_search_ctx(ctx);
1598 CASE_SENSITIVE, 0, NULL, 0, ctx);
1609 a = ctx->attr;
1652 ntfs_attr_put_search_ctx(ctx);
1655 ctx = NULL;
1698 if (ctx)
1699 ntfs_attr_put_search_ctx(ctx);
1757 ntfs_attr_search_ctx *ctx;
1845 ctx = ntfs_attr_get_search_ctx(ni, m);
1846 if (!ctx) {
1852 err = ntfs_attr_lookup(AT_ATTRIBUTE_LIST, NULL, 0, 0, 0, NULL, 0, ctx);
1867 a = ctx->attr;
1930 } else /* if (!ctx.attr->non_resident) */ {
1935 (u8*)ctx->mrec + vol->mft_record_size) {
2006 ntfs_attr_reinit_search_ctx(ctx);
2012 ctx))) {
2016 a = ctx->attr;
2107 ntfs_attr_put_search_ctx(ctx);
2161 ntfs_attr_put_search_ctx(ctx);
2178 ntfs_attr_put_search_ctx(ctx);
2362 ntfs_attr_search_ctx *ctx;
2388 ctx = NULL;
2392 ctx = ntfs_attr_get_search_ctx(base_ni, m);
2393 if (unlikely(!ctx)) {
2401 CASE_SENSITIVE, 0, NULL, 0, ctx);
2414 m = ctx->mrec;
2415 a = ctx->attr;
2497 flush_dcache_mft_record_page(ctx->ntfs_ino);
2498 mark_mft_record_dirty(ctx->ntfs_ino);
2546 ntfs_attr_put_search_ctx(ctx);
2648 flush_dcache_mft_record_page(ctx->ntfs_ino);
2649 mark_mft_record_dirty(ctx->ntfs_ino);
2679 ntfs_attr_put_search_ctx(ctx);
2696 vol->cluster_size_bits, -1, ctx);
2697 m = ctx->mrec;
2698 a = ctx->attr;
2792 flush_dcache_mft_record_page(ctx->ntfs_ino);
2793 mark_mft_record_dirty(ctx->ntfs_ino);
2795 ntfs_attr_put_search_ctx(ctx);
2835 if (ctx)
2836 ntfs_attr_put_search_ctx(ctx);
2960 ntfs_attr_search_ctx *ctx;
2985 ctx = ntfs_attr_get_search_ctx(ni, m);
2986 if (unlikely(!ctx)) {
2991 CASE_SENSITIVE, 0, NULL, 0, ctx);
2993 ntfs_attr_put_search_ctx(ctx);
2996 si = (STANDARD_INFORMATION*)((u8*)ctx->attr +
2997 le16_to_cpu(ctx->attr->data.resident.value_offset));
3043 flush_dcache_mft_record_page(ctx->ntfs_ino);
3044 if (!NInoTestSetDirty(ctx->ntfs_ino))
3045 mark_ntfs_record_dirty(ctx->ntfs_ino->page,
3046 ctx->ntfs_ino->page_ofs);
3048 ntfs_attr_put_search_ctx(ctx);