diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2010-07-04 12:18:57 +0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-08-09 16:47:27 -0400 |
commit | 0e4f6a791b1e8cfde75a74e2f885642ecb3fe9d8 (patch) | |
tree | 3cb4d6590be13c4890a7d6d40b90a2517ccbe87a /fs/reiserfs/super.c | |
parent | 918377b696bff7384923a1ef4bf0af7626cb9b68 (diff) | |
download | op-kernel-dev-0e4f6a791b1e8cfde75a74e2f885642ecb3fe9d8.zip op-kernel-dev-0e4f6a791b1e8cfde75a74e2f885642ecb3fe9d8.tar.gz |
Fix reiserfs_file_release()
a) count file openers correctly; i_count use was completely wrong
b) use new mutex for exclusion between final close/open/truncate,
to protect tailpacking logics. i_mutex use was wrong and resulted
in deadlocks.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/reiserfs/super.c')
-rw-r--r-- | fs/reiserfs/super.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c index 9822fa1..1e1ee90 100644 --- a/fs/reiserfs/super.c +++ b/fs/reiserfs/super.c @@ -525,6 +525,8 @@ static struct inode *reiserfs_alloc_inode(struct super_block *sb) kmem_cache_alloc(reiserfs_inode_cachep, GFP_KERNEL); if (!ei) return NULL; + atomic_set(&ei->openers, 0); + mutex_init(&ei->tailpack); return &ei->vfs_inode; } |