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/inode.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/inode.c')
-rw-r--r-- | fs/reiserfs/inode.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c index 0f22fdaf54ac..6edac85c2b93 100644 --- a/fs/reiserfs/inode.c +++ b/fs/reiserfs/inode.c | |||
@@ -1138,7 +1138,6 @@ static void init_inode(struct inode *inode, struct treepath *path) | |||
1138 | REISERFS_I(inode)->i_prealloc_count = 0; | 1138 | REISERFS_I(inode)->i_prealloc_count = 0; |
1139 | REISERFS_I(inode)->i_trans_id = 0; | 1139 | REISERFS_I(inode)->i_trans_id = 0; |
1140 | REISERFS_I(inode)->i_jl = NULL; | 1140 | REISERFS_I(inode)->i_jl = NULL; |
1141 | mutex_init(&(REISERFS_I(inode)->i_mmap)); | ||
1142 | reiserfs_init_xattr_rwsem(inode); | 1141 | reiserfs_init_xattr_rwsem(inode); |
1143 | 1142 | ||
1144 | if (stat_data_v1(ih)) { | 1143 | if (stat_data_v1(ih)) { |
@@ -1841,7 +1840,6 @@ int reiserfs_new_inode(struct reiserfs_transaction_handle *th, | |||
1841 | REISERFS_I(inode)->i_attrs = | 1840 | REISERFS_I(inode)->i_attrs = |
1842 | REISERFS_I(dir)->i_attrs & REISERFS_INHERIT_MASK; | 1841 | REISERFS_I(dir)->i_attrs & REISERFS_INHERIT_MASK; |
1843 | sd_attrs_to_i_attrs(REISERFS_I(inode)->i_attrs, inode); | 1842 | sd_attrs_to_i_attrs(REISERFS_I(inode)->i_attrs, inode); |
1844 | mutex_init(&(REISERFS_I(inode)->i_mmap)); | ||
1845 | reiserfs_init_xattr_rwsem(inode); | 1843 | reiserfs_init_xattr_rwsem(inode); |
1846 | 1844 | ||
1847 | /* key to search for correct place for new stat data */ | 1845 | /* key to search for correct place for new stat data */ |