summaryrefslogtreecommitdiffstats
path: root/fs/ntfs/inode.c
diff options
context:
space:
mode:
authorAnton Altaparmakov <aia21@cantab.net>2004-11-18 13:46:45 +0000
committerAnton Altaparmakov <aia21@cantab.net>2005-05-05 10:30:29 +0100
commit367636772f094fd840d2d79e75257bcfaa28e70f (patch)
treea8d8f3154eea80710a8cad2b7de082046aa012f0 /fs/ntfs/inode.c
parent899101aebb9ab3692aa8efe2805174ee0ee3edb5 (diff)
downloadop-kernel-dev-367636772f094fd840d2d79e75257bcfaa28e70f.zip
op-kernel-dev-367636772f094fd840d2d79e75257bcfaa28e70f.tar.gz
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>
Diffstat (limited to 'fs/ntfs/inode.c')
-rw-r--r--fs/ntfs/inode.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ntfs/inode.c b/fs/ntfs/inode.c
index 31840ba..a02d8d9 100644
--- a/fs/ntfs/inode.c
+++ b/fs/ntfs/inode.c
@@ -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);
OpenPOWER on IntegriCloud