Commit ecd731d4 authored by Anton Altaparmakov's avatar Anton Altaparmakov Committed by Richard Russon

NTFS: Rename {{re,}init,get,put}_attr_search_ctx() to

      ntfs_attr_{{re,}init,get,put}_search_ctx() as well as the type
      attr_search_context to ntfs_attr_search_ctx.
Signed-off-by: default avatarAnton Altaparmakov <aia21@cantab.net>
parent c8d3aeee
...@@ -35,6 +35,9 @@ ToDo/Notes: ...@@ -35,6 +35,9 @@ ToDo/Notes:
- Rename {find,lookup}_attr() to ntfs_attr_{find,lookup}() as well as - Rename {find,lookup}_attr() to ntfs_attr_{find,lookup}() as well as
find_external_attr() to ntfs_external_attr_find() to cleanup the find_external_attr() to ntfs_external_attr_find() to cleanup the
namespace a bit and to be more consistent with libntfs. namespace a bit and to be more consistent with libntfs.
- Rename {{re,}init,get,put}_attr_search_ctx() to
ntfs_attr_{{re,}init,get,put}_search_ctx() as well as the type
attr_search_context to ntfs_attr_search_ctx.
2.1.17 - Fix bugs in mount time error code paths and other updates. 2.1.17 - Fix bugs in mount time error code paths and other updates.
......
...@@ -348,7 +348,7 @@ int ntfs_readpage(struct file *file, struct page *page) ...@@ -348,7 +348,7 @@ int ntfs_readpage(struct file *file, struct page *page)
s64 attr_pos; s64 attr_pos;
ntfs_inode *ni, *base_ni; ntfs_inode *ni, *base_ni;
u8 *kaddr; u8 *kaddr;
attr_search_context *ctx; ntfs_attr_search_ctx *ctx;
MFT_RECORD *mrec; MFT_RECORD *mrec;
u32 attr_len; u32 attr_len;
int err = 0; int err = 0;
...@@ -397,7 +397,7 @@ int ntfs_readpage(struct file *file, struct page *page) ...@@ -397,7 +397,7 @@ int ntfs_readpage(struct file *file, struct page *page)
err = PTR_ERR(mrec); err = PTR_ERR(mrec);
goto err_out; goto err_out;
} }
ctx = get_attr_search_ctx(base_ni, mrec); ctx = ntfs_attr_get_search_ctx(base_ni, mrec);
if (unlikely(!ctx)) { if (unlikely(!ctx)) {
err = -ENOMEM; err = -ENOMEM;
goto unm_err_out; goto unm_err_out;
...@@ -433,7 +433,7 @@ int ntfs_readpage(struct file *file, struct page *page) ...@@ -433,7 +433,7 @@ int ntfs_readpage(struct file *file, struct page *page)
SetPageUptodate(page); SetPageUptodate(page);
put_unm_err_out: put_unm_err_out:
put_attr_search_ctx(ctx); ntfs_attr_put_search_ctx(ctx);
unm_err_out: unm_err_out:
unmap_mft_record(base_ni); unmap_mft_record(base_ni);
err_out: err_out:
...@@ -1030,7 +1030,7 @@ static int ntfs_writepage(struct page *page, struct writeback_control *wbc) ...@@ -1030,7 +1030,7 @@ static int ntfs_writepage(struct page *page, struct writeback_control *wbc)
struct inode *vi; struct inode *vi;
ntfs_inode *ni, *base_ni; ntfs_inode *ni, *base_ni;
char *kaddr; char *kaddr;
attr_search_context *ctx; ntfs_attr_search_ctx *ctx;
MFT_RECORD *m; MFT_RECORD *m;
u32 attr_len, bytes; u32 attr_len, bytes;
int err; int err;
...@@ -1117,7 +1117,7 @@ static int ntfs_writepage(struct page *page, struct writeback_control *wbc) ...@@ -1117,7 +1117,7 @@ static int ntfs_writepage(struct page *page, struct writeback_control *wbc)
ctx = NULL; ctx = NULL;
goto err_out; goto err_out;
} }
ctx = get_attr_search_ctx(base_ni, m); ctx = ntfs_attr_get_search_ctx(base_ni, m);
if (unlikely(!ctx)) { if (unlikely(!ctx)) {
err = -ENOMEM; err = -ENOMEM;
goto err_out; goto err_out;
...@@ -1201,7 +1201,7 @@ static int ntfs_writepage(struct page *page, struct writeback_control *wbc) ...@@ -1201,7 +1201,7 @@ static int ntfs_writepage(struct page *page, struct writeback_control *wbc)
/* Mark the mft record dirty, so it gets written back. */ /* Mark the mft record dirty, so it gets written back. */
mark_mft_record_dirty(ctx->ntfs_ino); mark_mft_record_dirty(ctx->ntfs_ino);
put_attr_search_ctx(ctx); ntfs_attr_put_search_ctx(ctx);
unmap_mft_record(base_ni); unmap_mft_record(base_ni);
return 0; return 0;
err_out: err_out:
...@@ -1221,7 +1221,7 @@ static int ntfs_writepage(struct page *page, struct writeback_control *wbc) ...@@ -1221,7 +1221,7 @@ static int ntfs_writepage(struct page *page, struct writeback_control *wbc)
} }
unlock_page(page); unlock_page(page);
if (ctx) if (ctx)
put_attr_search_ctx(ctx); ntfs_attr_put_search_ctx(ctx);
if (m) if (m)
unmap_mft_record(base_ni); unmap_mft_record(base_ni);
return err; return err;
...@@ -1683,9 +1683,9 @@ static int ntfs_prepare_write(struct file *file, struct page *page, ...@@ -1683,9 +1683,9 @@ static int ntfs_prepare_write(struct file *file, struct page *page,
* We thus defer the uptodate bringing of the page region outside the * We thus defer the uptodate bringing of the page region outside the
* region written to to ntfs_commit_write(). The reason for doing this * region written to to ntfs_commit_write(). The reason for doing this
* is that we save one round of: * is that we save one round of:
* map_mft_record(), get_attr_search_ctx(), ntfs_attr_lookup(), * map_mft_record(), ntfs_attr_get_search_ctx(),
* kmap_atomic(), kunmap_atomic(), put_attr_search_ctx(), * ntfs_attr_lookup(), kmap_atomic(), kunmap_atomic(),
* unmap_mft_record(). * ntfs_attr_put_search_ctx(), unmap_mft_record().
* Which is obviously a very worthwhile save. * Which is obviously a very worthwhile save.
* *
* Thus we just return success now... * Thus we just return success now...
...@@ -1804,7 +1804,7 @@ static int ntfs_commit_write(struct file *file, struct page *page, ...@@ -1804,7 +1804,7 @@ static int ntfs_commit_write(struct file *file, struct page *page,
struct inode *vi; struct inode *vi;
ntfs_inode *ni, *base_ni; ntfs_inode *ni, *base_ni;
char *kaddr, *kattr; char *kaddr, *kattr;
attr_search_context *ctx; ntfs_attr_search_ctx *ctx;
MFT_RECORD *m; MFT_RECORD *m;
u32 attr_len, bytes; u32 attr_len, bytes;
int err; int err;
...@@ -1891,7 +1891,7 @@ static int ntfs_commit_write(struct file *file, struct page *page, ...@@ -1891,7 +1891,7 @@ static int ntfs_commit_write(struct file *file, struct page *page,
ctx = NULL; ctx = NULL;
goto err_out; goto err_out;
} }
ctx = get_attr_search_ctx(base_ni, m); ctx = ntfs_attr_get_search_ctx(base_ni, m);
if (unlikely(!ctx)) { if (unlikely(!ctx)) {
err = -ENOMEM; err = -ENOMEM;
goto err_out; goto err_out;
...@@ -1966,7 +1966,7 @@ static int ntfs_commit_write(struct file *file, struct page *page, ...@@ -1966,7 +1966,7 @@ static int ntfs_commit_write(struct file *file, struct page *page,
/* Mark the mft record dirty, so it gets written back. */ /* Mark the mft record dirty, so it gets written back. */
mark_mft_record_dirty(ctx->ntfs_ino); mark_mft_record_dirty(ctx->ntfs_ino);
put_attr_search_ctx(ctx); ntfs_attr_put_search_ctx(ctx);
unmap_mft_record(base_ni); unmap_mft_record(base_ni);
ntfs_debug("Done."); ntfs_debug("Done.");
return 0; return 0;
...@@ -1993,7 +1993,7 @@ static int ntfs_commit_write(struct file *file, struct page *page, ...@@ -1993,7 +1993,7 @@ static int ntfs_commit_write(struct file *file, struct page *page,
SetPageError(page); SetPageError(page);
} }
if (ctx) if (ctx)
put_attr_search_ctx(ctx); ntfs_attr_put_search_ctx(ctx);
if (m) if (m)
unmap_mft_record(base_ni); unmap_mft_record(base_ni);
return err; return err;
......
...@@ -946,7 +946,7 @@ runlist_element *decompress_mapping_pairs(const ntfs_volume *vol, ...@@ -946,7 +946,7 @@ runlist_element *decompress_mapping_pairs(const ntfs_volume *vol,
int ntfs_map_runlist(ntfs_inode *ni, VCN vcn) int ntfs_map_runlist(ntfs_inode *ni, VCN vcn)
{ {
ntfs_inode *base_ni; ntfs_inode *base_ni;
attr_search_context *ctx; ntfs_attr_search_ctx *ctx;
MFT_RECORD *mrec; MFT_RECORD *mrec;
int err = 0; int err = 0;
...@@ -961,14 +961,14 @@ int ntfs_map_runlist(ntfs_inode *ni, VCN vcn) ...@@ -961,14 +961,14 @@ int ntfs_map_runlist(ntfs_inode *ni, VCN vcn)
mrec = map_mft_record(base_ni); mrec = map_mft_record(base_ni);
if (IS_ERR(mrec)) if (IS_ERR(mrec))
return PTR_ERR(mrec); return PTR_ERR(mrec);
ctx = get_attr_search_ctx(base_ni, mrec); ctx = ntfs_attr_get_search_ctx(base_ni, mrec);
if (!ctx) { if (!ctx) {
err = -ENOMEM; err = -ENOMEM;
goto err_out; goto err_out;
} }
if (!ntfs_attr_lookup(ni->type, ni->name, ni->name_len, CASE_SENSITIVE, if (!ntfs_attr_lookup(ni->type, ni->name, ni->name_len, CASE_SENSITIVE,
vcn, NULL, 0, ctx)) { vcn, NULL, 0, ctx)) {
put_attr_search_ctx(ctx); ntfs_attr_put_search_ctx(ctx);
err = -ENOENT; err = -ENOENT;
goto err_out; goto err_out;
} }
...@@ -987,7 +987,7 @@ int ntfs_map_runlist(ntfs_inode *ni, VCN vcn) ...@@ -987,7 +987,7 @@ int ntfs_map_runlist(ntfs_inode *ni, VCN vcn)
} }
up_write(&ni->runlist.lock); up_write(&ni->runlist.lock);
put_attr_search_ctx(ctx); ntfs_attr_put_search_ctx(ctx);
err_out: err_out:
unmap_mft_record(base_ni); unmap_mft_record(base_ni);
return err; return err;
...@@ -1199,7 +1199,7 @@ runlist_element *ntfs_find_vcn(ntfs_inode *ni, const VCN vcn, ...@@ -1199,7 +1199,7 @@ runlist_element *ntfs_find_vcn(ntfs_inode *ni, const VCN vcn,
*/ */
BOOL ntfs_attr_find(const ATTR_TYPES type, const ntfschar *name, BOOL ntfs_attr_find(const ATTR_TYPES type, const ntfschar *name,
const u32 name_len, const IGNORE_CASE_BOOL ic, const u32 name_len, const IGNORE_CASE_BOOL ic,
const u8 *val, const u32 val_len, attr_search_context *ctx) const u8 *val, const u32 val_len, ntfs_attr_search_ctx *ctx)
{ {
ATTR_RECORD *a; ATTR_RECORD *a;
ntfs_volume *vol; ntfs_volume *vol;
...@@ -1440,13 +1440,13 @@ int load_attribute_list(ntfs_volume *vol, runlist *runlist, u8 *al_start, ...@@ -1440,13 +1440,13 @@ int load_attribute_list(ntfs_volume *vol, runlist *runlist, u8 *al_start,
* in there and return it. * in there and return it.
* *
* On first search @ctx->ntfs_ino must be the base mft record and @ctx must * On first search @ctx->ntfs_ino must be the base mft record and @ctx must
* have been obtained from a call to get_attr_search_ctx(). On subsequent * have been obtained from a call to ntfs_attr_get_search_ctx(). On subsequent
* calls @ctx->ntfs_ino can be any extent inode, too (@ctx->base_ntfs_ino is * calls @ctx->ntfs_ino can be any extent inode, too (@ctx->base_ntfs_ino is
* then the base inode). * then the base inode).
* *
* After finishing with the attribute/mft record you need to call * After finishing with the attribute/mft record you need to call
* put_attr_search_ctx() to cleanup the search context (unmapping any mapped * ntfs_attr_put_search_ctx() to cleanup the search context (unmapping any
* inodes, etc). * mapped inodes, etc).
* *
* Return TRUE if the search was successful and FALSE if not. When TRUE, * Return TRUE if the search was successful and FALSE if not. When TRUE,
* @ctx->attr is the found attribute and it is in mft record @ctx->mrec. When * @ctx->attr is the found attribute and it is in mft record @ctx->mrec. When
...@@ -1459,7 +1459,7 @@ int load_attribute_list(ntfs_volume *vol, runlist *runlist, u8 *al_start, ...@@ -1459,7 +1459,7 @@ int load_attribute_list(ntfs_volume *vol, runlist *runlist, u8 *al_start,
static BOOL ntfs_external_attr_find(const ATTR_TYPES type, static BOOL ntfs_external_attr_find(const ATTR_TYPES type,
const ntfschar *name, const u32 name_len, const ntfschar *name, const u32 name_len,
const IGNORE_CASE_BOOL ic, const VCN lowest_vcn, const IGNORE_CASE_BOOL ic, const VCN lowest_vcn,
const u8 *val, const u32 val_len, attr_search_context *ctx) const u8 *val, const u32 val_len, ntfs_attr_search_ctx *ctx)
{ {
ntfs_inode *base_ni, *ni; ntfs_inode *base_ni, *ni;
ntfs_volume *vol; ntfs_volume *vol;
...@@ -1692,7 +1692,7 @@ static BOOL ntfs_external_attr_find(const ATTR_TYPES type, ...@@ -1692,7 +1692,7 @@ static BOOL ntfs_external_attr_find(const ATTR_TYPES type,
* *
* FIXME: Do we really want to do this here? Think about it... (AIA) * FIXME: Do we really want to do this here? Think about it... (AIA)
*/ */
reinit_attr_search_ctx(ctx); ntfs_attr_reinit_search_ctx(ctx);
ntfs_attr_find(type, name, name_len, ic, val, val_len, ctx); ntfs_attr_find(type, name, name_len, ic, val, val_len, ctx);
ntfs_debug("Done, not found."); ntfs_debug("Done, not found.");
return FALSE; return FALSE;
...@@ -1711,14 +1711,14 @@ static BOOL ntfs_external_attr_find(const ATTR_TYPES type, ...@@ -1711,14 +1711,14 @@ static BOOL ntfs_external_attr_find(const ATTR_TYPES type,
* *
* Find an attribute in an ntfs inode. On first search @ctx->ntfs_ino must * Find an attribute in an ntfs inode. On first search @ctx->ntfs_ino must
* be the base mft record and @ctx must have been obtained from a call to * be the base mft record and @ctx must have been obtained from a call to
* get_attr_search_ctx(). * ntfs_attr_get_search_ctx().
* *
* This function transparently handles attribute lists and @ctx is used to * This function transparently handles attribute lists and @ctx is used to
* continue searches where they were left off at. * continue searches where they were left off at.
* *
* After finishing with the attribute/mft record you need to call * After finishing with the attribute/mft record you need to call
* put_attr_search_ctx() to cleanup the search context (unmapping any mapped * ntfs_attr_put_search_ctx() to cleanup the search context (unmapping any
* inodes, etc). * mapped inodes, etc).
* *
* Return TRUE if the search was successful and FALSE if not. When TRUE, * Return TRUE if the search was successful and FALSE if not. When TRUE,
* @ctx->attr is the found attribute and it is in mft record @ctx->mrec. When * @ctx->attr is the found attribute and it is in mft record @ctx->mrec. When
...@@ -1729,7 +1729,7 @@ static BOOL ntfs_external_attr_find(const ATTR_TYPES type, ...@@ -1729,7 +1729,7 @@ static BOOL ntfs_external_attr_find(const ATTR_TYPES type,
BOOL ntfs_attr_lookup(const ATTR_TYPES type, const ntfschar *name, BOOL ntfs_attr_lookup(const ATTR_TYPES type, const ntfschar *name,
const u32 name_len, const IGNORE_CASE_BOOL ic, const u32 name_len, const IGNORE_CASE_BOOL ic,
const VCN lowest_vcn, const u8 *val, const u32 val_len, const VCN lowest_vcn, const u8 *val, const u32 val_len,
attr_search_context *ctx) ntfs_attr_search_ctx *ctx)
{ {
ntfs_inode *base_ni; ntfs_inode *base_ni;
...@@ -1748,14 +1748,14 @@ BOOL ntfs_attr_lookup(const ATTR_TYPES type, const ntfschar *name, ...@@ -1748,14 +1748,14 @@ BOOL ntfs_attr_lookup(const ATTR_TYPES type, const ntfschar *name,
} }
/** /**
* init_attr_search_ctx - initialize an attribute search context * ntfs_attr_init_search_ctx - initialize an attribute search context
* @ctx: attribute search context to initialize * @ctx: attribute search context to initialize
* @ni: ntfs inode with which to initialize the search context * @ni: ntfs inode with which to initialize the search context
* @mrec: mft record with which to initialize the search context * @mrec: mft record with which to initialize the search context
* *
* Initialize the attribute search context @ctx with @ni and @mrec. * Initialize the attribute search context @ctx with @ni and @mrec.
*/ */
static inline void init_attr_search_ctx(attr_search_context *ctx, static inline void ntfs_attr_init_search_ctx(ntfs_attr_search_ctx *ctx,
ntfs_inode *ni, MFT_RECORD *mrec) ntfs_inode *ni, MFT_RECORD *mrec)
{ {
ctx->mrec = mrec; ctx->mrec = mrec;
...@@ -1770,7 +1770,7 @@ static inline void init_attr_search_ctx(attr_search_context *ctx, ...@@ -1770,7 +1770,7 @@ static inline void init_attr_search_ctx(attr_search_context *ctx,
} }
/** /**
* reinit_attr_search_ctx - reinitialize an attribute search context * ntfs_attr_reinit_search_ctx - reinitialize an attribute search context
* @ctx: attribute search context to reinitialize * @ctx: attribute search context to reinitialize
* *
* Reinitialize the attribute search context @ctx, unmapping an associated * Reinitialize the attribute search context @ctx, unmapping an associated
...@@ -1779,7 +1779,7 @@ static inline void init_attr_search_ctx(attr_search_context *ctx, ...@@ -1779,7 +1779,7 @@ static inline void init_attr_search_ctx(attr_search_context *ctx,
* This is used when a search for a new attribute is being started to reset * This is used when a search for a new attribute is being started to reset
* the search context to the beginning. * the search context to the beginning.
*/ */
void reinit_attr_search_ctx(attr_search_context *ctx) void ntfs_attr_reinit_search_ctx(ntfs_attr_search_ctx *ctx)
{ {
if (likely(!ctx->base_ntfs_ino)) { if (likely(!ctx->base_ntfs_ino)) {
/* No attribute list. */ /* No attribute list. */
...@@ -1791,40 +1791,39 @@ void reinit_attr_search_ctx(attr_search_context *ctx) ...@@ -1791,40 +1791,39 @@ void reinit_attr_search_ctx(attr_search_context *ctx)
} /* Attribute list. */ } /* Attribute list. */
if (ctx->ntfs_ino != ctx->base_ntfs_ino) if (ctx->ntfs_ino != ctx->base_ntfs_ino)
unmap_extent_mft_record(ctx->ntfs_ino); unmap_extent_mft_record(ctx->ntfs_ino);
init_attr_search_ctx(ctx, ctx->base_ntfs_ino, ctx->base_mrec); ntfs_attr_init_search_ctx(ctx, ctx->base_ntfs_ino, ctx->base_mrec);
return; return;
} }
/** /**
* get_attr_search_ctx - allocate and initialize a new attribute search context * ntfs_attr_get_search_ctx - allocate/initialize a new attribute search context
* @ni: ntfs inode with which to initialize the search context * @ni: ntfs inode with which to initialize the search context
* @mrec: mft record with which to initialize the search context * @mrec: mft record with which to initialize the search context
* *
* Allocate a new attribute search context, initialize it with @ni and @mrec, * Allocate a new attribute search context, initialize it with @ni and @mrec,
* and return it. Return NULL if allocation failed. * and return it. Return NULL if allocation failed.
*/ */
attr_search_context *get_attr_search_ctx(ntfs_inode *ni, MFT_RECORD *mrec) ntfs_attr_search_ctx *ntfs_attr_get_search_ctx(ntfs_inode *ni, MFT_RECORD *mrec)
{ {
attr_search_context *ctx; ntfs_attr_search_ctx *ctx;
ctx = kmem_cache_alloc(ntfs_attr_ctx_cache, SLAB_NOFS); ctx = kmem_cache_alloc(ntfs_attr_ctx_cache, SLAB_NOFS);
if (ctx) if (ctx)
init_attr_search_ctx(ctx, ni, mrec); ntfs_attr_init_search_ctx(ctx, ni, mrec);
return ctx; return ctx;
} }
/** /**
* put_attr_search_ctx - release an attribute search context * ntfs_attr_put_search_ctx - release an attribute search context
* @ctx: attribute search context to free * @ctx: attribute search context to free
* *
* Release the attribute search context @ctx, unmapping an associated extent * Release the attribute search context @ctx, unmapping an associated extent
* mft record if present. * mft record if present.
*/ */
void put_attr_search_ctx(attr_search_context *ctx) void ntfs_attr_put_search_ctx(ntfs_attr_search_ctx *ctx)
{ {
if (ctx->base_ntfs_ino && ctx->ntfs_ino != ctx->base_ntfs_ino) if (ctx->base_ntfs_ino && ctx->ntfs_ino != ctx->base_ntfs_ino)
unmap_extent_mft_record(ctx->ntfs_ino); unmap_extent_mft_record(ctx->ntfs_ino);
kmem_cache_free(ntfs_attr_ctx_cache, ctx); kmem_cache_free(ntfs_attr_ctx_cache, ctx);
return; return;
} }
...@@ -43,7 +43,7 @@ typedef enum { ...@@ -43,7 +43,7 @@ typedef enum {
} LCN_SPECIAL_VALUES; } LCN_SPECIAL_VALUES;
/** /**
* attr_search_context - used in attribute search functions * ntfs_attr_search_ctx - used in attribute search functions
* @mrec: buffer containing mft record to search * @mrec: buffer containing mft record to search
* @attr: attribute record in @mrec where to begin/continue search * @attr: attribute record in @mrec where to begin/continue search
* @is_first: if true ntfs_attr_lookup() begins search with @attr, else after * @is_first: if true ntfs_attr_lookup() begins search with @attr, else after
...@@ -69,7 +69,7 @@ typedef struct { ...@@ -69,7 +69,7 @@ typedef struct {
ntfs_inode *base_ntfs_ino; ntfs_inode *base_ntfs_ino;
MFT_RECORD *base_mrec; MFT_RECORD *base_mrec;
ATTR_RECORD *base_attr; ATTR_RECORD *base_attr;
} attr_search_context; } ntfs_attr_search_ctx;
extern runlist_element *decompress_mapping_pairs(const ntfs_volume *vol, extern runlist_element *decompress_mapping_pairs(const ntfs_volume *vol,
const ATTR_RECORD *attr, runlist_element *old_rl); const ATTR_RECORD *attr, runlist_element *old_rl);
...@@ -83,12 +83,12 @@ extern runlist_element *ntfs_find_vcn(ntfs_inode *ni, const VCN vcn, ...@@ -83,12 +83,12 @@ extern runlist_element *ntfs_find_vcn(ntfs_inode *ni, const VCN vcn,
extern BOOL ntfs_attr_find(const ATTR_TYPES type, const ntfschar *name, extern BOOL ntfs_attr_find(const ATTR_TYPES type, const ntfschar *name,
const u32 name_len, const IGNORE_CASE_BOOL ic, const u8 *val, const u32 name_len, const IGNORE_CASE_BOOL ic, const u8 *val,
const u32 val_len, attr_search_context *ctx); const u32 val_len, ntfs_attr_search_ctx *ctx);
BOOL ntfs_attr_lookup(const ATTR_TYPES type, const ntfschar *name, BOOL ntfs_attr_lookup(const ATTR_TYPES type, const ntfschar *name,
const u32 name_len, const IGNORE_CASE_BOOL ic, const u32 name_len, const IGNORE_CASE_BOOL ic,
const VCN lowest_vcn, const u8 *val, const u32 val_len, const VCN lowest_vcn, const u8 *val, const u32 val_len,
attr_search_context *ctx); ntfs_attr_search_ctx *ctx);
extern int load_attribute_list(ntfs_volume *vol, runlist *rl, u8 *al_start, extern int load_attribute_list(ntfs_volume *vol, runlist *rl, u8 *al_start,
const s64 size, const s64 initialized_size); const s64 size, const s64 initialized_size);
...@@ -100,9 +100,9 @@ static inline s64 attribute_value_length(const ATTR_RECORD *a) ...@@ -100,9 +100,9 @@ static inline s64 attribute_value_length(const ATTR_RECORD *a)
return sle64_to_cpu(a->data.non_resident.data_size); return sle64_to_cpu(a->data.non_resident.data_size);
} }
extern void reinit_attr_search_ctx(attr_search_context *ctx); extern void ntfs_attr_reinit_search_ctx(ntfs_attr_search_ctx *ctx);
extern attr_search_context *get_attr_search_ctx(ntfs_inode *ni, extern ntfs_attr_search_ctx *ntfs_attr_get_search_ctx(ntfs_inode *ni,
MFT_RECORD *mrec); MFT_RECORD *mrec);
extern void put_attr_search_ctx(attr_search_context *ctx); extern void ntfs_attr_put_search_ctx(ntfs_attr_search_ctx *ctx);
#endif /* _LINUX_NTFS_ATTRIB_H */ #endif /* _LINUX_NTFS_ATTRIB_H */
...@@ -83,7 +83,7 @@ MFT_REF ntfs_lookup_inode_by_name(ntfs_inode *dir_ni, const ntfschar *uname, ...@@ -83,7 +83,7 @@ MFT_REF ntfs_lookup_inode_by_name(ntfs_inode *dir_ni, const ntfschar *uname,
INDEX_ALLOCATION *ia; INDEX_ALLOCATION *ia;
u8 *index_end; u8 *index_end;
u64 mref; u64 mref;
attr_search_context *ctx; ntfs_attr_search_ctx *ctx;
int err, rc; int err, rc;
VCN vcn, old_vcn; VCN vcn, old_vcn;
struct address_space *ia_mapping; struct address_space *ia_mapping;
...@@ -100,7 +100,7 @@ MFT_REF ntfs_lookup_inode_by_name(ntfs_inode *dir_ni, const ntfschar *uname, ...@@ -100,7 +100,7 @@ MFT_REF ntfs_lookup_inode_by_name(ntfs_inode *dir_ni, const ntfschar *uname,
-PTR_ERR(m)); -PTR_ERR(m));
return ERR_MREF(PTR_ERR(m)); return ERR_MREF(PTR_ERR(m));
} }
ctx = get_attr_search_ctx(dir_ni, m); ctx = ntfs_attr_get_search_ctx(dir_ni, m);
if (unlikely(!ctx)) { if (unlikely(!ctx)) {
err = -ENOMEM; err = -ENOMEM;
goto err_out; goto err_out;
...@@ -179,7 +179,7 @@ MFT_REF ntfs_lookup_inode_by_name(ntfs_inode *dir_ni, const ntfschar *uname, ...@@ -179,7 +179,7 @@ MFT_REF ntfs_lookup_inode_by_name(ntfs_inode *dir_ni, const ntfschar *uname,
*res = NULL; *res = NULL;
} }
mref = le64_to_cpu(ie->data.dir.indexed_file); mref = le64_to_cpu(ie->data.dir.indexed_file);
put_attr_search_ctx(ctx); ntfs_attr_put_search_ctx(ctx);
unmap_mft_record(dir_ni); unmap_mft_record(dir_ni);
return mref; return mref;
} }
...@@ -278,7 +278,7 @@ MFT_REF ntfs_lookup_inode_by_name(ntfs_inode *dir_ni, const ntfschar *uname, ...@@ -278,7 +278,7 @@ MFT_REF ntfs_lookup_inode_by_name(ntfs_inode *dir_ni, const ntfschar *uname,
*/ */
if (!(ie->flags & INDEX_ENTRY_NODE)) { if (!(ie->flags & INDEX_ENTRY_NODE)) {
if (name) { if (name) {
put_attr_search_ctx(ctx); ntfs_attr_put_search_ctx(ctx);
unmap_mft_record(dir_ni); unmap_mft_record(dir_ni);
return name->mref; return name->mref;
} }
...@@ -301,7 +301,7 @@ MFT_REF ntfs_lookup_inode_by_name(ntfs_inode *dir_ni, const ntfschar *uname, ...@@ -301,7 +301,7 @@ MFT_REF ntfs_lookup_inode_by_name(ntfs_inode *dir_ni, const ntfschar *uname,
* We are done with the index root and the mft record. Release them, * We are done with the index root and the mft record. Release them,
* otherwise we deadlock with ntfs_map_page(). * otherwise we deadlock with ntfs_map_page().
*/ */
put_attr_search_ctx(ctx); ntfs_attr_put_search_ctx(ctx);
unmap_mft_record(dir_ni); unmap_mft_record(dir_ni);
m = NULL; m = NULL;
ctx = NULL; ctx = NULL;
...@@ -582,7 +582,7 @@ MFT_REF ntfs_lookup_inode_by_name(ntfs_inode *dir_ni, const ntfschar *uname, ...@@ -582,7 +582,7 @@ MFT_REF ntfs_lookup_inode_by_name(ntfs_inode *dir_ni, const ntfschar *uname,
ntfs_unmap_page(page); ntfs_unmap_page(page);
err_out: err_out:
if (ctx) if (ctx)
put_attr_search_ctx(ctx); ntfs_attr_put_search_ctx(ctx);
if (m) if (m)
unmap_mft_record(dir_ni); unmap_mft_record(dir_ni);
if (name) { if (name) {
...@@ -634,7 +634,7 @@ u64 ntfs_lookup_inode_by_name(ntfs_inode *dir_ni, const ntfschar *uname, ...@@ -634,7 +634,7 @@ u64 ntfs_lookup_inode_by_name(ntfs_inode *dir_ni, const ntfschar *uname,
INDEX_ALLOCATION *ia; INDEX_ALLOCATION *ia;
u8 *index_end; u8 *index_end;
u64 mref; u64 mref;
attr_search_context *ctx; ntfs_attr_search_ctx *ctx;
int err, rc; int err, rc;
IGNORE_CASE_BOOL ic; IGNORE_CASE_BOOL ic;
VCN vcn, old_vcn; VCN vcn, old_vcn;
...@@ -649,7 +649,7 @@ u64 ntfs_lookup_inode_by_name(ntfs_inode *dir_ni, const ntfschar *uname, ...@@ -649,7 +649,7 @@ u64 ntfs_lookup_inode_by_name(ntfs_inode *dir_ni, const ntfschar *uname,
-PTR_ERR(m)); -PTR_ERR(m));
return ERR_MREF(PTR_ERR(m)); return ERR_MREF(PTR_ERR(m));
} }
ctx = get_attr_search_ctx(dir_ni, m); ctx = ntfs_attr_get_search_ctx(dir_ni, m);
if (!ctx) { if (!ctx) {
err = -ENOMEM; err = -ENOMEM;
goto err_out; goto err_out;
...@@ -710,7 +710,7 @@ u64 ntfs_lookup_inode_by_name(ntfs_inode *dir_ni, const ntfschar *uname, ...@@ -710,7 +710,7 @@ u64 ntfs_lookup_inode_by_name(ntfs_inode *dir_ni, const ntfschar *uname,
vol->upcase, vol->upcase_len)) { vol->upcase, vol->upcase_len)) {
found_it: found_it:
mref = le64_to_cpu(ie->data.dir.indexed_file); mref = le64_to_cpu(ie->data.dir.indexed_file);
put_attr_search_ctx(ctx); ntfs_attr_put_search_ctx(ctx);
unmap_mft_record(dir_ni); unmap_mft_record(dir_ni);
return mref; return mref;
} }
...@@ -776,7 +776,7 @@ u64 ntfs_lookup_inode_by_name(ntfs_inode *dir_ni, const ntfschar *uname, ...@@ -776,7 +776,7 @@ u64 ntfs_lookup_inode_by_name(ntfs_inode *dir_ni, const ntfschar *uname,
* We are done with the index root and the mft record. Release them, * We are done with the index root and the mft record. Release them,
* otherwise we deadlock with ntfs_map_page(). * otherwise we deadlock with ntfs_map_page().
*/ */
put_attr_search_ctx(ctx); ntfs_attr_put_search_ctx(ctx);
unmap_mft_record(dir_ni); unmap_mft_record(dir_ni);
m = NULL; m = NULL;
ctx = NULL; ctx = NULL;
...@@ -979,7 +979,7 @@ u64 ntfs_lookup_inode_by_name(ntfs_inode *dir_ni, const ntfschar *uname, ...@@ -979,7 +979,7 @@ u64 ntfs_lookup_inode_by_name(ntfs_inode *dir_ni, const ntfschar *uname,
ntfs_unmap_page(page); ntfs_unmap_page(page);
err_out: err_out:
if (ctx) if (ctx)
put_attr_search_ctx(ctx); ntfs_attr_put_search_ctx(ctx);
if (m) if (m)
unmap_mft_record(dir_ni); unmap_mft_record(dir_ni);
return ERR_MREF(err); return ERR_MREF(err);
...@@ -1125,7 +1125,7 @@ static int ntfs_readdir(struct file *filp, void *dirent, filldir_t filldir) ...@@ -1125,7 +1125,7 @@ static int ntfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
struct address_space *ia_mapping, *bmp_mapping; struct address_space *ia_mapping, *bmp_mapping;
struct page *bmp_page = NULL, *ia_page = NULL; struct page *bmp_page = NULL, *ia_page = NULL;
u8 *kaddr, *bmp, *index_end; u8 *kaddr, *bmp, *index_end;
attr_search_context *ctx; ntfs_attr_search_ctx *ctx;
fpos = filp->f_pos; fpos = filp->f_pos;
ntfs_debug("Entering for inode 0x%lx, fpos 0x%llx.", ntfs_debug("Entering for inode 0x%lx, fpos 0x%llx.",
...@@ -1175,7 +1175,7 @@ static int ntfs_readdir(struct file *filp, void *dirent, filldir_t filldir) ...@@ -1175,7 +1175,7 @@ static int ntfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
m = NULL; m = NULL;
goto err_out; goto err_out;
} }
ctx = get_attr_search_ctx(ndir, m); ctx = ntfs_attr_get_search_ctx(ndir, m);
if (unlikely(!ctx)) { if (unlikely(!ctx)) {
err = -ENOMEM; err = -ENOMEM;
goto err_out; goto err_out;
...@@ -1208,7 +1208,7 @@ static int ntfs_readdir(struct file *filp, void *dirent, filldir_t filldir) ...@@ -1208,7 +1208,7 @@ static int ntfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
/* Copy the index root value (it has been verified in read_inode). */ /* Copy the index root value (it has been verified in read_inode). */
memcpy(ir, (u8*)ctx->attr + memcpy(ir, (u8*)ctx->attr +
le16_to_cpu(ctx->attr->data.resident.value_offset), rc); le16_to_cpu(ctx->attr->data.resident.value_offset), rc);
put_attr_search_ctx(ctx); ntfs_attr_put_search_ctx(ctx);
unmap_mft_record(ndir); unmap_mft_record(ndir);
ctx = NULL; ctx = NULL;
m = NULL; m = NULL;
...@@ -1460,7 +1460,7 @@ static int ntfs_readdir(struct file *filp, void *dirent, filldir_t filldir) ...@@ -1460,7 +1460,7 @@ static int ntfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
if (name) if (name)
kfree(name); kfree(name);
if (ctx) if (ctx)
put_attr_search_ctx(ctx); ntfs_attr_put_search_ctx(ctx);
if (m) if (m)
unmap_mft_record(ndir); unmap_mft_record(ndir);
if (!err) if (!err)
......
...@@ -65,7 +65,7 @@ void ntfs_index_ctx_put(ntfs_index_context *ictx) ...@@ -65,7 +65,7 @@ void ntfs_index_ctx_put(ntfs_index_context *ictx)
if (ictx->entry) { if (ictx->entry) {
if (ictx->is_in_root) { if (ictx->is_in_root) {
if (ictx->actx) if (ictx->actx)
put_attr_search_ctx(ictx->actx); ntfs_attr_put_search_ctx(ictx->actx);
if (ictx->base_ni) if (ictx->base_ni)
unmap_mft_record(ictx->base_ni); unmap_mft_record(ictx->base_ni);
} else { } else {
...@@ -134,7 +134,7 @@ int ntfs_index_lookup(const void *key, const int key_len, ...@@ -134,7 +134,7 @@ int ntfs_index_lookup(const void *key, const int key_len,
INDEX_ENTRY *ie; INDEX_ENTRY *ie;
INDEX_ALLOCATION *ia; INDEX_ALLOCATION *ia;
u8 *index_end; u8 *index_end;
attr_search_context *actx; ntfs_attr_search_ctx *actx;
int rc, err = 0; int rc, err = 0;
VCN vcn, old_vcn; VCN vcn, old_vcn;
struct address_space *ia_mapping; struct address_space *ia_mapping;
...@@ -162,7 +162,7 @@ int ntfs_index_lookup(const void *key, const int key_len, ...@@ -162,7 +162,7 @@ int ntfs_index_lookup(const void *key, const int key_len,
-PTR_ERR(m)); -PTR_ERR(m));
return PTR_ERR(m); return PTR_ERR(m);
} }
actx = get_attr_search_ctx(base_ni, m); actx = ntfs_attr_get_search_ctx(base_ni, m);
if (unlikely(!actx)) { if (unlikely(!actx)) {
err = -ENOMEM; err = -ENOMEM;
goto err_out; goto err_out;
...@@ -269,7 +269,7 @@ int ntfs_index_lookup(const void *key, const int key_len, ...@@ -269,7 +269,7 @@ int ntfs_index_lookup(const void *key, const int key_len,
* We are done with the index root and the mft record. Release them, * We are done with the index root and the mft record. Release them,
* otherwise we deadlock with ntfs_map_page(). * otherwise we deadlock with ntfs_map_page().
*/ */
put_attr_search_ctx(actx); ntfs_attr_put_search_ctx(actx);
unmap_mft_record(base_ni); unmap_mft_record(base_ni);
m = NULL; m = NULL;
actx = NULL; actx = NULL;
...@@ -448,7 +448,7 @@ int ntfs_index_lookup(const void *key, const int key_len, ...@@ -448,7 +448,7 @@ int ntfs_index_lookup(const void *key, const int key_len,
ntfs_unmap_page(page); ntfs_unmap_page(page);
err_out: err_out:
if (actx) if (actx)
put_attr_search_ctx(actx); ntfs_attr_put_search_ctx(actx);
if (m) if (m)
unmap_mft_record(base_ni); unmap_mft_record(base_ni);
return err; return err;
......
...@@ -78,7 +78,7 @@ typedef struct { ...@@ -78,7 +78,7 @@ typedef struct {
u16 data_len; u16 data_len;
BOOL is_in_root; BOOL is_in_root;
INDEX_ROOT *ir; INDEX_ROOT *ir;
attr_search_context *actx; ntfs_attr_search_ctx *actx;
ntfs_inode *base_ni; ntfs_inode *base_ni;
INDEX_ALLOCATION *ia; INDEX_ALLOCATION *ia;
struct page *page; struct page *page;
......
...@@ -430,12 +430,12 @@ inline ntfs_inode *ntfs_new_extent_inode(struct super_block *sb, ...@@ -430,12 +430,12 @@ inline ntfs_inode *ntfs_new_extent_inode(struct super_block *sb,
* 0: file is not in $Extend directory * 0: file is not in $Extend directory
* -EIO: file is corrupt * -EIO: file is corrupt
*/ */
static int ntfs_is_extended_system_file(attr_search_context *ctx) static int ntfs_is_extended_system_file(ntfs_attr_search_ctx *ctx)
{ {
int nr_links; int nr_links;
/* Restart search. */ /* Restart search. */
reinit_attr_search_ctx(ctx); ntfs_attr_reinit_search_ctx(ctx);
/* Get number of hard links. */ /* Get number of hard links. */
nr_links = le16_to_cpu(ctx->mrec->link_count); nr_links = le16_to_cpu(ctx->mrec->link_count);
...@@ -525,7 +525,7 @@ static int ntfs_read_locked_inode(struct inode *vi) ...@@ -525,7 +525,7 @@ static int ntfs_read_locked_inode(struct inode *vi)
ntfs_inode *ni; ntfs_inode *ni;
MFT_RECORD *m; MFT_RECORD *m;
STANDARD_INFORMATION *si; STANDARD_INFORMATION *si;
attr_search_context *ctx; ntfs_attr_search_ctx *ctx;
int err = 0; int err = 0;
ntfs_debug("Entering for i_ino 0x%lx.", vi->i_ino); ntfs_debug("Entering for i_ino 0x%lx.", vi->i_ino);
...@@ -557,7 +557,7 @@ static int ntfs_read_locked_inode(struct inode *vi) ...@@ -557,7 +557,7 @@ static int ntfs_read_locked_inode(struct inode *vi)
err = PTR_ERR(m); err = PTR_ERR(m);
goto err_out; goto err_out;
} }
ctx = get_attr_search_ctx(ni, m); ctx = ntfs_attr_get_search_ctx(ni, m);
if (!ctx) { if (!ctx) {
err = -ENOMEM; err = -ENOMEM;
goto unm_err_out; goto unm_err_out;
...@@ -646,7 +646,7 @@ static int ntfs_read_locked_inode(struct inode *vi) ...@@ -646,7 +646,7 @@ static int ntfs_read_locked_inode(struct inode *vi)
vi->i_atime = ntfs2utc(si->last_access_time); vi->i_atime = ntfs2utc(si->last_access_time);
/* Find the attribute list attribute if present. */ /* Find the attribute list attribute if present. */
reinit_attr_search_ctx(ctx); ntfs_attr_reinit_search_ctx(ctx);
if (ntfs_attr_lookup(AT_ATTRIBUTE_LIST, NULL, 0, 0, 0, NULL, 0, ctx)) { if (ntfs_attr_lookup(AT_ATTRIBUTE_LIST, NULL, 0, 0, 0, NULL, 0, ctx)) {
if (vi->i_ino == FILE_MFT) if (vi->i_ino == FILE_MFT)
goto skip_attr_list_load; goto skip_attr_list_load;
...@@ -733,7 +733,7 @@ static int ntfs_read_locked_inode(struct inode *vi) ...@@ -733,7 +733,7 @@ static int ntfs_read_locked_inode(struct inode *vi)
char *ir_end, *index_end; char *ir_end, *index_end;
/* It is a directory, find index root attribute. */ /* It is a directory, find index root attribute. */
reinit_attr_search_ctx(ctx); ntfs_attr_reinit_search_ctx(ctx);
if (!ntfs_attr_lookup(AT_INDEX_ROOT, I30, 4, CASE_SENSITIVE, 0, if (!ntfs_attr_lookup(AT_INDEX_ROOT, I30, 4, CASE_SENSITIVE, 0,
NULL, 0, ctx)) { NULL, 0, ctx)) {
// FIXME: File is corrupt! Hot-fix with empty index // FIXME: File is corrupt! Hot-fix with empty index
...@@ -841,7 +841,7 @@ static int ntfs_read_locked_inode(struct inode *vi) ...@@ -841,7 +841,7 @@ static int ntfs_read_locked_inode(struct inode *vi)
vi->i_size = ni->initialized_size = vi->i_size = ni->initialized_size =
ni->allocated_size = 0; ni->allocated_size = 0;
/* We are done with the mft record, so we release it. */ /* We are done with the mft record, so we release it. */
put_attr_search_ctx(ctx); ntfs_attr_put_search_ctx(ctx);
unmap_mft_record(ni); unmap_mft_record(ni);
m = NULL; m = NULL;
ctx = NULL; ctx = NULL;
...@@ -849,7 +849,7 @@ static int ntfs_read_locked_inode(struct inode *vi) ...@@ -849,7 +849,7 @@ static int ntfs_read_locked_inode(struct inode *vi)
} /* LARGE_INDEX: Index allocation present. Setup state. */ } /* LARGE_INDEX: Index allocation present. Setup state. */
NInoSetIndexAllocPresent(ni); NInoSetIndexAllocPresent(ni);
/* Find index allocation attribute. */ /* Find index allocation attribute. */
reinit_attr_search_ctx(ctx); ntfs_attr_reinit_search_ctx(ctx);
if (!ntfs_attr_lookup(AT_INDEX_ALLOCATION, I30, 4, if (!ntfs_attr_lookup(AT_INDEX_ALLOCATION, I30, 4,
CASE_SENSITIVE, 0, NULL, 0, ctx)) { CASE_SENSITIVE, 0, NULL, 0, ctx)) {
ntfs_error(vi->i_sb, "$INDEX_ALLOCATION attribute " ntfs_error(vi->i_sb, "$INDEX_ALLOCATION attribute "
...@@ -894,7 +894,7 @@ static int ntfs_read_locked_inode(struct inode *vi) ...@@ -894,7 +894,7 @@ static int ntfs_read_locked_inode(struct inode *vi)
* We are done with the mft record, so we release it. Otherwise * We are done with the mft record, so we release it. Otherwise
* we would deadlock in ntfs_attr_iget(). * we would deadlock in ntfs_attr_iget().
*/ */
put_attr_search_ctx(ctx); ntfs_attr_put_search_ctx(ctx);
unmap_mft_record(ni); unmap_mft_record(ni);
m = NULL; m = NULL;
ctx = NULL; ctx = NULL;
...@@ -938,7 +938,7 @@ static int ntfs_read_locked_inode(struct inode *vi) ...@@ -938,7 +938,7 @@ static int ntfs_read_locked_inode(struct inode *vi)
vi->i_mapping->a_ops = &ntfs_mst_aops; vi->i_mapping->a_ops = &ntfs_mst_aops;
} else { } else {
/* It is a file. */ /* It is a file. */
reinit_attr_search_ctx(ctx); ntfs_attr_reinit_search_ctx(ctx);
/* Setup the data attribute, even if not present. */ /* Setup the data attribute, even if not present. */
ni->type = AT_DATA; ni->type = AT_DATA;
...@@ -1059,7 +1059,7 @@ static int ntfs_read_locked_inode(struct inode *vi) ...@@ -1059,7 +1059,7 @@ static int ntfs_read_locked_inode(struct inode *vi)
} }
no_data_attr_special_case: no_data_attr_special_case:
/* We are done with the mft record, so we release it. */ /* We are done with the mft record, so we release it. */
put_attr_search_ctx(ctx); ntfs_attr_put_search_ctx(ctx);
unmap_mft_record(ni); unmap_mft_record(ni);
m = NULL; m = NULL;
ctx = NULL; ctx = NULL;
...@@ -1098,7 +1098,7 @@ static int ntfs_read_locked_inode(struct inode *vi) ...@@ -1098,7 +1098,7 @@ static int ntfs_read_locked_inode(struct inode *vi)
if (!err) if (!err)
err = -EIO; err = -EIO;
if (ctx) if (ctx)
put_attr_search_ctx(ctx); ntfs_attr_put_search_ctx(ctx);
if (m) if (m)
unmap_mft_record(ni); unmap_mft_record(ni);
err_out: err_out:
...@@ -1133,7 +1133,7 @@ static int ntfs_read_locked_attr_inode(struct inode *base_vi, struct inode *vi) ...@@ -1133,7 +1133,7 @@ static int ntfs_read_locked_attr_inode(struct inode *base_vi, struct inode *vi)
ntfs_volume *vol = NTFS_SB(vi->i_sb); ntfs_volume *vol = NTFS_SB(vi->i_sb);
ntfs_inode *ni, *base_ni; ntfs_inode *ni, *base_ni;
MFT_RECORD *m; MFT_RECORD *m;
attr_search_context *ctx; ntfs_attr_search_ctx *ctx;
int err = 0; int err = 0;
ntfs_debug("Entering for i_ino 0x%lx.", vi->i_ino); ntfs_debug("Entering for i_ino 0x%lx.", vi->i_ino);
...@@ -1162,7 +1162,7 @@ static int ntfs_read_locked_attr_inode(struct inode *base_vi, struct inode *vi) ...@@ -1162,7 +1162,7 @@ static int ntfs_read_locked_attr_inode(struct inode *base_vi, struct inode *vi)
err = PTR_ERR(m); err = PTR_ERR(m);
goto err_out; goto err_out;
} }
ctx = get_attr_search_ctx(base_ni, m); ctx = ntfs_attr_get_search_ctx(base_ni, m);
if (!ctx) { if (!ctx) {
err = -ENOMEM; err = -ENOMEM;
goto unm_err_out; goto unm_err_out;
...@@ -1333,7 +1333,7 @@ static int ntfs_read_locked_attr_inode(struct inode *base_vi, struct inode *vi) ...@@ -1333,7 +1333,7 @@ static int ntfs_read_locked_attr_inode(struct inode *base_vi, struct inode *vi)
ni->ext.base_ntfs_ino = base_ni; ni->ext.base_ntfs_ino = base_ni;
ni->nr_extents = -1; ni->nr_extents = -1;
put_attr_search_ctx(ctx); ntfs_attr_put_search_ctx(ctx);
unmap_mft_record(base_ni); unmap_mft_record(base_ni);
ntfs_debug("Done."); ntfs_debug("Done.");
...@@ -1343,7 +1343,7 @@ static int ntfs_read_locked_attr_inode(struct inode *base_vi, struct inode *vi) ...@@ -1343,7 +1343,7 @@ static int ntfs_read_locked_attr_inode(struct inode *base_vi, struct inode *vi)
if (!err) if (!err)
err = -EIO; err = -EIO;
if (ctx) if (ctx)
put_attr_search_ctx(ctx); ntfs_attr_put_search_ctx(ctx);
unmap_mft_record(base_ni); unmap_mft_record(base_ni);
err_out: err_out:
ntfs_error(vi->i_sb, "Failed with error code %i while reading " ntfs_error(vi->i_sb, "Failed with error code %i while reading "
...@@ -1392,7 +1392,7 @@ static int ntfs_read_locked_index_inode(struct inode *base_vi, struct inode *vi) ...@@ -1392,7 +1392,7 @@ static int ntfs_read_locked_index_inode(struct inode *base_vi, struct inode *vi)
ntfs_inode *ni, *base_ni, *bni; ntfs_inode *ni, *base_ni, *bni;
struct inode *bvi; struct inode *bvi;
MFT_RECORD *m; MFT_RECORD *m;
attr_search_context *ctx; ntfs_attr_search_ctx *ctx;
INDEX_ROOT *ir; INDEX_ROOT *ir;
u8 *ir_end, *index_end; u8 *ir_end, *index_end;
int err = 0; int err = 0;
...@@ -1419,7 +1419,7 @@ static int ntfs_read_locked_index_inode(struct inode *base_vi, struct inode *vi) ...@@ -1419,7 +1419,7 @@ static int ntfs_read_locked_index_inode(struct inode *base_vi, struct inode *vi)
err = PTR_ERR(m); err = PTR_ERR(m);
goto err_out; goto err_out;
} }
ctx = get_attr_search_ctx(base_ni, m); ctx = ntfs_attr_get_search_ctx(base_ni, m);
if (!ctx) { if (!ctx) {
err = -ENOMEM; err = -ENOMEM;
goto unm_err_out; goto unm_err_out;
...@@ -1497,7 +1497,7 @@ static int ntfs_read_locked_index_inode(struct inode *base_vi, struct inode *vi) ...@@ -1497,7 +1497,7 @@ static int ntfs_read_locked_index_inode(struct inode *base_vi, struct inode *vi)
/* No index allocation. */ /* No index allocation. */
vi->i_size = ni->initialized_size = ni->allocated_size = 0; vi->i_size = ni->initialized_size = ni->allocated_size = 0;
/* We are done with the mft record, so we release it. */ /* We are done with the mft record, so we release it. */
put_attr_search_ctx(ctx); ntfs_attr_put_search_ctx(ctx);
unmap_mft_record(base_ni); unmap_mft_record(base_ni);
m = NULL; m = NULL;
ctx = NULL; ctx = NULL;
...@@ -1505,7 +1505,7 @@ static int ntfs_read_locked_index_inode(struct inode *base_vi, struct inode *vi) ...@@ -1505,7 +1505,7 @@ static int ntfs_read_locked_index_inode(struct inode *base_vi, struct inode *vi)
} /* LARGE_INDEX: Index allocation present. Setup state. */ } /* LARGE_INDEX: Index allocation present. Setup state. */
NInoSetIndexAllocPresent(ni); NInoSetIndexAllocPresent(ni);
/* Find index allocation attribute. */ /* Find index allocation attribute. */
reinit_attr_search_ctx(ctx); ntfs_attr_reinit_search_ctx(ctx);
if (!ntfs_attr_lookup(AT_INDEX_ALLOCATION, ni->name, ni->name_len, if (!ntfs_attr_lookup(AT_INDEX_ALLOCATION, ni->name, ni->name_len,
CASE_SENSITIVE, 0, NULL, 0, ctx)) { CASE_SENSITIVE, 0, NULL, 0, ctx)) {
ntfs_error(vi->i_sb, "$INDEX_ALLOCATION attribute is not " ntfs_error(vi->i_sb, "$INDEX_ALLOCATION attribute is not "
...@@ -1546,7 +1546,7 @@ static int ntfs_read_locked_index_inode(struct inode *base_vi, struct inode *vi) ...@@ -1546,7 +1546,7 @@ static int ntfs_read_locked_index_inode(struct inode *base_vi, struct inode *vi)
* We are done with the mft record, so we release it. Otherwise * We are done with the mft record, so we release it. Otherwise
* we would deadlock in ntfs_attr_iget(). * we would deadlock in ntfs_attr_iget().
*/ */
put_attr_search_ctx(ctx); ntfs_attr_put_search_ctx(ctx);
unmap_mft_record(base_ni); unmap_mft_record(base_ni);
m = NULL; m = NULL;
ctx = NULL; ctx = NULL;
...@@ -1597,7 +1597,7 @@ static int ntfs_read_locked_index_inode(struct inode *base_vi, struct inode *vi) ...@@ -1597,7 +1597,7 @@ static int ntfs_read_locked_index_inode(struct inode *base_vi, struct inode *vi)
if (!err) if (!err)
err = -EIO; err = -EIO;
if (ctx) if (ctx)
put_attr_search_ctx(ctx); ntfs_attr_put_search_ctx(ctx);
if (m) if (m)
unmap_mft_record(base_ni); unmap_mft_record(base_ni);
err_out: err_out:
...@@ -1644,7 +1644,7 @@ int ntfs_read_inode_mount(struct inode *vi) ...@@ -1644,7 +1644,7 @@ int ntfs_read_inode_mount(struct inode *vi)
ntfs_inode *ni; ntfs_inode *ni;
MFT_RECORD *m = NULL; MFT_RECORD *m = NULL;
ATTR_RECORD *attr; ATTR_RECORD *attr;
attr_search_context *ctx; ntfs_attr_search_ctx *ctx;
unsigned int i, nr_blocks; unsigned int i, nr_blocks;
int err; int err;
...@@ -1719,7 +1719,7 @@ int ntfs_read_inode_mount(struct inode *vi) ...@@ -1719,7 +1719,7 @@ int ntfs_read_inode_mount(struct inode *vi)
/* Provides readpage() and sync_page() for map_mft_record(). */ /* Provides readpage() and sync_page() for map_mft_record(). */
vi->i_mapping->a_ops = &ntfs_mft_aops; vi->i_mapping->a_ops = &ntfs_mft_aops;
ctx = get_attr_search_ctx(ni, m); ctx = ntfs_attr_get_search_ctx(ni, m);
if (!ctx) { if (!ctx) {
err = -ENOMEM; err = -ENOMEM;
goto err_out; goto err_out;
...@@ -1855,7 +1855,7 @@ int ntfs_read_inode_mount(struct inode *vi) ...@@ -1855,7 +1855,7 @@ int ntfs_read_inode_mount(struct inode *vi)
} }
} }
reinit_attr_search_ctx(ctx); ntfs_attr_reinit_search_ctx(ctx);
/* Now load all attribute extents. */ /* Now load all attribute extents. */
attr = NULL; attr = NULL;
...@@ -1955,7 +1955,7 @@ int ntfs_read_inode_mount(struct inode *vi) ...@@ -1955,7 +1955,7 @@ int ntfs_read_inode_mount(struct inode *vi)
"saw this message to " "saw this message to "
"linux-ntfs-dev@lists." "linux-ntfs-dev@lists."
"sourceforge.net"); "sourceforge.net");
put_attr_search_ctx(ctx); ntfs_attr_put_search_ctx(ctx);
/* Revert to the safe super operations. */ /* Revert to the safe super operations. */
ntfs_free(m); ntfs_free(m);
return -1; return -1;
...@@ -2005,7 +2005,7 @@ int ntfs_read_inode_mount(struct inode *vi) ...@@ -2005,7 +2005,7 @@ int ntfs_read_inode_mount(struct inode *vi)
(unsigned long long)last_vcn - 1); (unsigned long long)last_vcn - 1);
goto put_err_out; goto put_err_out;
} }
put_attr_search_ctx(ctx); ntfs_attr_put_search_ctx(ctx);
ntfs_debug("Done."); ntfs_debug("Done.");
ntfs_free(m); ntfs_free(m);
return 0; return 0;
...@@ -2014,7 +2014,7 @@ int ntfs_read_inode_mount(struct inode *vi) ...@@ -2014,7 +2014,7 @@ int ntfs_read_inode_mount(struct inode *vi)
ntfs_error(sb, "Couldn't find first extent of $DATA attribute in " ntfs_error(sb, "Couldn't find first extent of $DATA attribute in "
"attribute list. $MFT is corrupt. Run chkdsk."); "attribute list. $MFT is corrupt. Run chkdsk.");
put_err_out: put_err_out:
put_attr_search_ctx(ctx); ntfs_attr_put_search_ctx(ctx);
err_out: err_out:
ntfs_error(sb, "Failed. Marking inode as bad."); ntfs_error(sb, "Failed. Marking inode as bad.");
make_bad_inode(vi); make_bad_inode(vi);
...@@ -2317,7 +2317,7 @@ int ntfs_write_inode(struct inode *vi, int sync) ...@@ -2317,7 +2317,7 @@ int ntfs_write_inode(struct inode *vi, int sync)
{ {
s64 nt; s64 nt;
ntfs_inode *ni = NTFS_I(vi); ntfs_inode *ni = NTFS_I(vi);
attr_search_context *ctx; ntfs_attr_search_ctx *ctx;
MFT_RECORD *m; MFT_RECORD *m;
STANDARD_INFORMATION *si; STANDARD_INFORMATION *si;
int err = 0; int err = 0;
...@@ -2342,14 +2342,14 @@ int ntfs_write_inode(struct inode *vi, int sync) ...@@ -2342,14 +2342,14 @@ int ntfs_write_inode(struct inode *vi, int sync)
goto err_out; goto err_out;
} }
/* Update the access times in the standard information attribute. */ /* Update the access times in the standard information attribute. */
ctx = get_attr_search_ctx(ni, m); ctx = ntfs_attr_get_search_ctx(ni, m);
if (unlikely(!ctx)) { if (unlikely(!ctx)) {
err = -ENOMEM; err = -ENOMEM;
goto unm_err_out; goto unm_err_out;
} }
if (unlikely(!ntfs_attr_lookup(AT_STANDARD_INFORMATION, NULL, 0, if (unlikely(!ntfs_attr_lookup(AT_STANDARD_INFORMATION, NULL, 0,
CASE_SENSITIVE, 0, NULL, 0, ctx))) { CASE_SENSITIVE, 0, NULL, 0, ctx))) {
put_attr_search_ctx(ctx); ntfs_attr_put_search_ctx(ctx);
err = -ENOENT; err = -ENOENT;
goto unm_err_out; goto unm_err_out;
} }
...@@ -2395,7 +2395,7 @@ int ntfs_write_inode(struct inode *vi, int sync) ...@@ -2395,7 +2395,7 @@ int ntfs_write_inode(struct inode *vi, int sync)
*/ */
if (modified && !NInoTestSetDirty(ctx->ntfs_ino)) if (modified && !NInoTestSetDirty(ctx->ntfs_ino))
__set_page_dirty_nobuffers(ctx->ntfs_ino->page); __set_page_dirty_nobuffers(ctx->ntfs_ino->page);
put_attr_search_ctx(ctx); ntfs_attr_put_search_ctx(ctx);
/* Now the access times are updated, write the base mft record. */ /* Now the access times are updated, write the base mft record. */
if (NInoDirty(ni)) if (NInoDirty(ni))
err = write_mft_record(ni, m, sync); err = write_mft_record(ni, m, sync);
......
...@@ -171,7 +171,7 @@ static struct dentry *ntfs_lookup(struct inode *dir_ino, struct dentry *dent, ...@@ -171,7 +171,7 @@ static struct dentry *ntfs_lookup(struct inode *dir_ino, struct dentry *dent,
{ {
struct dentry *real_dent, *new_dent; struct dentry *real_dent, *new_dent;
MFT_RECORD *m; MFT_RECORD *m;
attr_search_context *ctx; ntfs_attr_search_ctx *ctx;
ntfs_inode *ni = NTFS_I(dent_inode); ntfs_inode *ni = NTFS_I(dent_inode);
int err; int err;
struct qstr nls_name; struct qstr nls_name;
...@@ -196,7 +196,7 @@ static struct dentry *ntfs_lookup(struct inode *dir_ino, struct dentry *dent, ...@@ -196,7 +196,7 @@ static struct dentry *ntfs_lookup(struct inode *dir_ino, struct dentry *dent,
ctx = NULL; ctx = NULL;
goto err_out; goto err_out;
} }
ctx = get_attr_search_ctx(ni, m); ctx = ntfs_attr_get_search_ctx(ni, m);
if (!ctx) { if (!ctx) {
err = -ENOMEM; err = -ENOMEM;
goto err_out; goto err_out;
...@@ -233,7 +233,7 @@ static struct dentry *ntfs_lookup(struct inode *dir_ino, struct dentry *dent, ...@@ -233,7 +233,7 @@ static struct dentry *ntfs_lookup(struct inode *dir_ino, struct dentry *dent,
(ntfschar*)&fn->file_name, fn->file_name_length, (ntfschar*)&fn->file_name, fn->file_name_length,
(unsigned char**)&nls_name.name, 0); (unsigned char**)&nls_name.name, 0);
put_attr_search_ctx(ctx); ntfs_attr_put_search_ctx(ctx);
unmap_mft_record(ni); unmap_mft_record(ni);
} }
m = NULL; m = NULL;
...@@ -329,7 +329,7 @@ static struct dentry *ntfs_lookup(struct inode *dir_ino, struct dentry *dent, ...@@ -329,7 +329,7 @@ static struct dentry *ntfs_lookup(struct inode *dir_ino, struct dentry *dent,
err = -EIO; err = -EIO;
err_out: err_out:
if (ctx) if (ctx)
put_attr_search_ctx(ctx); ntfs_attr_put_search_ctx(ctx);
if (m) if (m)
unmap_mft_record(ni); unmap_mft_record(ni);
iput(dent_inode); iput(dent_inode);
...@@ -366,7 +366,7 @@ struct dentry *ntfs_get_parent(struct dentry *child_dent) ...@@ -366,7 +366,7 @@ struct dentry *ntfs_get_parent(struct dentry *child_dent)
struct inode *vi = child_dent->d_inode; struct inode *vi = child_dent->d_inode;
ntfs_inode *ni = NTFS_I(vi); ntfs_inode *ni = NTFS_I(vi);
MFT_RECORD *mrec; MFT_RECORD *mrec;
attr_search_context *ctx; ntfs_attr_search_ctx *ctx;
ATTR_RECORD *attr; ATTR_RECORD *attr;
FILE_NAME_ATTR *fn; FILE_NAME_ATTR *fn;
struct inode *parent_vi; struct inode *parent_vi;
...@@ -379,7 +379,7 @@ struct dentry *ntfs_get_parent(struct dentry *child_dent) ...@@ -379,7 +379,7 @@ struct dentry *ntfs_get_parent(struct dentry *child_dent)
if (IS_ERR(mrec)) if (IS_ERR(mrec))
return (struct dentry *)mrec; return (struct dentry *)mrec;
/* Find the first file name attribute in the mft record. */ /* Find the first file name attribute in the mft record. */
ctx = get_attr_search_ctx(ni, mrec); ctx = ntfs_attr_get_search_ctx(ni, mrec);
if (unlikely(!ctx)) { if (unlikely(!ctx)) {
unmap_mft_record(ni); unmap_mft_record(ni);
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
...@@ -387,7 +387,7 @@ struct dentry *ntfs_get_parent(struct dentry *child_dent) ...@@ -387,7 +387,7 @@ struct dentry *ntfs_get_parent(struct dentry *child_dent)
try_next: try_next:
if (unlikely(!ntfs_attr_lookup(AT_FILE_NAME, NULL, 0, CASE_SENSITIVE, if (unlikely(!ntfs_attr_lookup(AT_FILE_NAME, NULL, 0, CASE_SENSITIVE,
0, NULL, 0, ctx))) { 0, NULL, 0, ctx))) {
put_attr_search_ctx(ctx); ntfs_attr_put_search_ctx(ctx);
unmap_mft_record(ni); unmap_mft_record(ni);
ntfs_error(vi->i_sb, "Inode 0x%lx does not have a file name " ntfs_error(vi->i_sb, "Inode 0x%lx does not have a file name "
"attribute. Run chkdsk.", vi->i_ino); "attribute. Run chkdsk.", vi->i_ino);
...@@ -404,7 +404,7 @@ struct dentry *ntfs_get_parent(struct dentry *child_dent) ...@@ -404,7 +404,7 @@ struct dentry *ntfs_get_parent(struct dentry *child_dent)
/* Get the inode number of the parent directory. */ /* Get the inode number of the parent directory. */
parent_ino = MREF_LE(fn->parent_directory); parent_ino = MREF_LE(fn->parent_directory);
/* Release the search context and the mft record of the child. */ /* Release the search context and the mft record of the child. */
put_attr_search_ctx(ctx); ntfs_attr_put_search_ctx(ctx);
unmap_mft_record(ni); unmap_mft_record(ni);
/* Get the inode of the parent directory. */ /* Get the inode of the parent directory. */
parent_vi = ntfs_iget(vi->i_sb, parent_ino); parent_vi = ntfs_iget(vi->i_sb, parent_ino);
......
...@@ -318,7 +318,7 @@ static int ntfs_write_volume_flags(ntfs_volume *vol, const VOLUME_FLAGS flags) ...@@ -318,7 +318,7 @@ static int ntfs_write_volume_flags(ntfs_volume *vol, const VOLUME_FLAGS flags)
ntfs_inode *ni = NTFS_I(vol->vol_ino); ntfs_inode *ni = NTFS_I(vol->vol_ino);
MFT_RECORD *m; MFT_RECORD *m;
VOLUME_INFORMATION *vi; VOLUME_INFORMATION *vi;
attr_search_context *ctx; ntfs_attr_search_ctx *ctx;
int err; int err;
ntfs_debug("Entering, old flags = 0x%x, new flags = 0x%x.", ntfs_debug("Entering, old flags = 0x%x, new flags = 0x%x.",
...@@ -331,7 +331,7 @@ static int ntfs_write_volume_flags(ntfs_volume *vol, const VOLUME_FLAGS flags) ...@@ -331,7 +331,7 @@ static int ntfs_write_volume_flags(ntfs_volume *vol, const VOLUME_FLAGS flags)
err = PTR_ERR(m); err = PTR_ERR(m);
goto err_out; goto err_out;
} }
ctx = get_attr_search_ctx(ni, m); ctx = ntfs_attr_get_search_ctx(ni, m);
if (!ctx) { if (!ctx) {
err = -ENOMEM; err = -ENOMEM;
goto put_unm_err_out; goto put_unm_err_out;
...@@ -346,14 +346,14 @@ static int ntfs_write_volume_flags(ntfs_volume *vol, const VOLUME_FLAGS flags) ...@@ -346,14 +346,14 @@ static int ntfs_write_volume_flags(ntfs_volume *vol, const VOLUME_FLAGS flags)
vol->vol_flags = vi->flags = flags; vol->vol_flags = vi->flags = flags;
flush_dcache_mft_record_page(ctx->ntfs_ino); flush_dcache_mft_record_page(ctx->ntfs_ino);
mark_mft_record_dirty(ctx->ntfs_ino); mark_mft_record_dirty(ctx->ntfs_ino);
put_attr_search_ctx(ctx); ntfs_attr_put_search_ctx(ctx);
unmap_mft_record(ni); unmap_mft_record(ni);
done: done:
ntfs_debug("Done."); ntfs_debug("Done.");
return 0; return 0;
put_unm_err_out: put_unm_err_out:
if (ctx) if (ctx)
put_attr_search_ctx(ctx); ntfs_attr_put_search_ctx(ctx);
unmap_mft_record(ni); unmap_mft_record(ni);
err_out: err_out:
ntfs_error(vol->sb, "Failed with error code %i.", -err); ntfs_error(vol->sb, "Failed with error code %i.", -err);
...@@ -1345,7 +1345,7 @@ static BOOL load_system_files(ntfs_volume *vol) ...@@ -1345,7 +1345,7 @@ static BOOL load_system_files(ntfs_volume *vol)
struct super_block *sb = vol->sb; struct super_block *sb = vol->sb;
MFT_RECORD *m; MFT_RECORD *m;
VOLUME_INFORMATION *vi; VOLUME_INFORMATION *vi;
attr_search_context *ctx; ntfs_attr_search_ctx *ctx;
ntfs_debug("Entering."); ntfs_debug("Entering.");
#ifdef NTFS_RW #ifdef NTFS_RW
...@@ -1429,14 +1429,14 @@ static BOOL load_system_files(ntfs_volume *vol) ...@@ -1429,14 +1429,14 @@ static BOOL load_system_files(ntfs_volume *vol)
iput(vol->vol_ino); iput(vol->vol_ino);
goto volume_failed; goto volume_failed;
} }
if (!(ctx = get_attr_search_ctx(NTFS_I(vol->vol_ino), m))) { if (!(ctx = ntfs_attr_get_search_ctx(NTFS_I(vol->vol_ino), m))) {
ntfs_error(sb, "Failed to get attribute search context."); ntfs_error(sb, "Failed to get attribute search context.");
goto get_ctx_vol_failed; goto get_ctx_vol_failed;
} }
if (!ntfs_attr_lookup(AT_VOLUME_INFORMATION, NULL, 0, 0, 0, NULL, 0, if (!ntfs_attr_lookup(AT_VOLUME_INFORMATION, NULL, 0, 0, 0, NULL, 0,
ctx) || ctx->attr->non_resident || ctx->attr->flags) { ctx) || ctx->attr->non_resident || ctx->attr->flags) {
err_put_vol: err_put_vol:
put_attr_search_ctx(ctx); ntfs_attr_put_search_ctx(ctx);
get_ctx_vol_failed: get_ctx_vol_failed:
unmap_mft_record(NTFS_I(vol->vol_ino)); unmap_mft_record(NTFS_I(vol->vol_ino));
goto iput_volume_failed; goto iput_volume_failed;
...@@ -1452,7 +1452,7 @@ static BOOL load_system_files(ntfs_volume *vol) ...@@ -1452,7 +1452,7 @@ static BOOL load_system_files(ntfs_volume *vol)
vol->vol_flags = vi->flags; vol->vol_flags = vi->flags;
vol->major_ver = vi->major_ver; vol->major_ver = vi->major_ver;
vol->minor_ver = vi->minor_ver; vol->minor_ver = vi->minor_ver;
put_attr_search_ctx(ctx); ntfs_attr_put_search_ctx(ctx);
unmap_mft_record(NTFS_I(vol->vol_ino)); unmap_mft_record(NTFS_I(vol->vol_ino));
printk(KERN_INFO "NTFS volume version %i.%i.\n", vol->major_ver, printk(KERN_INFO "NTFS volume version %i.%i.\n", vol->major_ver,
vol->minor_ver); vol->minor_ver);
...@@ -2629,7 +2629,7 @@ static int __init init_ntfs_fs(void) ...@@ -2629,7 +2629,7 @@ static int __init init_ntfs_fs(void)
goto ictx_err_out; goto ictx_err_out;
} }
ntfs_attr_ctx_cache = kmem_cache_create(ntfs_attr_ctx_cache_name, ntfs_attr_ctx_cache = kmem_cache_create(ntfs_attr_ctx_cache_name,
sizeof(attr_search_context), 0 /* offset */, sizeof(ntfs_attr_search_ctx), 0 /* offset */,
SLAB_HWCACHE_ALIGN, NULL /* ctor */, NULL /* dtor */); SLAB_HWCACHE_ALIGN, NULL /* ctor */, NULL /* dtor */);
if (!ntfs_attr_ctx_cache) { if (!ntfs_attr_ctx_cache) {
printk(KERN_CRIT "NTFS: Failed to create %s!\n", printk(KERN_CRIT "NTFS: Failed to create %s!\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment