diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2010-07-04 04: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) |
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 9822fa15118b..1e1ee9056eb6 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) | |||
525 | kmem_cache_alloc(reiserfs_inode_cachep, GFP_KERNEL); | 525 | kmem_cache_alloc(reiserfs_inode_cachep, GFP_KERNEL); |
526 | if (!ei) | 526 | if (!ei) |
527 | return NULL; | 527 | return NULL; |
528 | atomic_set(&ei->openers, 0); | ||
529 | mutex_init(&ei->tailpack); | ||
528 | return &ei->vfs_inode; | 530 | return &ei->vfs_inode; |
529 | } | 531 | } |
530 | 532 | ||