Lines Matching refs:ctx
133 ntfs_attr_search_ctx *ctx;
144 ctx = ntfs_attr_get_search_ctx(ni, NULL);
145 if (!ctx) {
146 ntfs_log_error("Failed to get ctx for efs\n");
152 CASE_SENSITIVE, 0, NULL, 0, ctx)) {
154 a = ctx->attr;
155 na = ntfs_attr_open(ctx->ntfs_ino, AT_DATA,
162 if (na && !(ctx->attr->flags & ATTR_IS_ENCRYPTED)) {
164 && ntfs_attr_make_non_resident(na, ctx)) {
181 ntfs_attr_put_search_ctx(ctx);
182 ctx = (ntfs_attr_search_ctx*)NULL;
189 && ntfs_efs_fixup_attribute(ctx, na)) {
198 if (ctx)
199 ntfs_attr_put_search_ctx(ctx);
317 int ntfs_efs_fixup_attribute(ntfs_attr_search_ctx *ctx, ntfs_attr *na)
330 if (!ctx) {
331 ctx = ntfs_attr_get_search_ctx(na->ni, NULL);
332 if (!ctx) {
333 ntfs_log_error("Failed to get ctx for efs\n");
338 CASE_SENSITIVE, 0, NULL, 0, ctx)) {
390 && ntfs_attr_make_non_resident(na, ctx)) {
402 ntfs_attr_reinit_search_ctx(ctx);
404 CASE_SENSITIVE, 0, NULL, 0, ctx)) {
418 ctx->attr->data_size = cpu_to_sle64(newsize);
419 if (sle64_to_cpu(ctx->attr->initialized_size) > newsize)
420 ctx->attr->initialized_size = ctx->attr->data_size;
421 ctx->attr->flags |= ATTR_IS_ENCRYPTED;
423 ntfs_attr_put_search_ctx(ctx);
427 if (close_ctx && ctx)
428 ntfs_attr_put_search_ctx(ctx);