Commit 9bd23ce4 authored by Anton Altaparmakov's avatar Anton Altaparmakov

Merge cantab.net:/usr/src/ntfs-tng-2.5 into cantab.net:/usr/src/tng

parents 6646ca45 7b2ac386
......@@ -385,7 +385,7 @@ int ntfs_readpage(struct file *file, struct page *page)
else
base_ni = ni->_INE(base_ntfs_ino);
/* Map, pin and lock the mft record. */
/* Map, pin, and lock the mft record. */
mrec = map_mft_record(base_ni);
if (unlikely(IS_ERR(mrec))) {
err = PTR_ERR(mrec);
......
......@@ -1676,7 +1676,7 @@ void reinit_attr_search_ctx(attr_search_context *ctx)
return;
} /* Attribute list. */
if (ctx->ntfs_ino != ctx->base_ntfs_ino)
unmap_mft_record(ctx->ntfs_ino);
unmap_extent_mft_record(ctx->ntfs_ino);
init_attr_search_ctx(ctx, ctx->base_ntfs_ino, ctx->base_mrec);
return;
}
......@@ -1709,7 +1709,7 @@ attr_search_context *get_attr_search_ctx(ntfs_inode *ni, MFT_RECORD *mrec)
void put_attr_search_ctx(attr_search_context *ctx)
{
if (ctx->base_ntfs_ino && ctx->ntfs_ino != ctx->base_ntfs_ino)
unmap_mft_record(ctx->ntfs_ino);
unmap_extent_mft_record(ctx->ntfs_ino);
kmem_cache_free(ntfs_attr_ctx_cache, ctx);
return;
}
......
......@@ -1048,9 +1048,7 @@ static inline int ntfs_filldir(ntfs_volume *vol, loff_t *fpos,
/*
* VFS calls readdir without BKL but with i_sem held. This protects the VFS
* parts (e.g. ->f_pos and ->i_size, and it also protects against directory
* modifications). Together with the rw semaphore taken by the call to
* map_mft_record(), the directory is truly locked down so we have a race free
* ntfs_readdir() without the BKL. (-:
* modifications).
*
* We use the same basic approach as the old NTFS driver, i.e. we parse the
* index root entries and then the index allocation entries that are marked
......
......@@ -844,7 +844,7 @@ static int ntfs_read_locked_inode(struct inode *vi)
ctx->attr->_ANR(allocated_size));
/*
* We are done with the mft record, so we release it. Otherwise
*
* we would deadlock in ntfs_attr_iget().
*/
put_attr_search_ctx(ctx);
unmap_mft_record(ni);
......
......@@ -176,8 +176,8 @@ static inline MFT_RECORD *map_mft_record_page(ntfs_inode *ni)
* First, take the mrec_lock semaphore. We might now be sleeping, while waiting
* for the semaphore if it was already locked by someone else.
*
* The page of the record is first mapped using map_mft_record_page() before
* being returned to the caller.
* The page of the record is mapped using map_mft_record_page() before being
* returned to the caller.
*
* This in turn uses ntfs_map_page() to get the page containing the wanted mft
* record (it in turn calls read_cache_page() which reads it in from disk if
......
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