diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2010-07-04 08:18:57 (GMT) |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-08-09 20:47:27 (GMT) |
commit | 0e4f6a791b1e8cfde75a74e2f885642ecb3fe9d8 (patch) | |
tree | 3cb4d6590be13c4890a7d6d40b90a2517ccbe87a /fs/reiserfs/super.c | |
parent | 918377b696bff7384923a1ef4bf0af7626cb9b68 (diff) | |
download | linux-0e4f6a791b1e8cfde75a74e2f885642ecb3fe9d8.tar.xz |
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; } |