NTFS: - In fs/ntfs/compress.c, use i_size_read() at the start and then use the

cached value everywhere.  Cache the initialized_size in the same way
	and protect the critical region where the two sizes are read using the
	new size_lock of the ntfs inode.
      - Add the new size_lock to the ntfs_inode structure (fs/ntfs/inode.h)
	and initialize it (fs/ntfs/inode.c).

Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
This commit is contained in:
Anton Altaparmakov
2004-11-18 13:46:45 +00:00
parent 899101aebb
commit 367636772f
4 changed files with 37 additions and 18 deletions

View File

@@ -376,6 +376,7 @@ static void ntfs_destroy_extent_inode(ntfs_inode *ni)
void __ntfs_init_inode(struct super_block *sb, ntfs_inode *ni)
{
ntfs_debug("Entering.");
rwlock_init(&ni->size_lock);
ni->initialized_size = ni->allocated_size = 0;
ni->seq_no = 0;
atomic_set(&ni->count, 1);