mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
918377b696
commit
0e4f6a791b
4 changed files with 34 additions and 28 deletions
|
@ -1138,7 +1138,6 @@ static void init_inode(struct inode *inode, struct treepath *path)
|
|||
REISERFS_I(inode)->i_prealloc_count = 0;
|
||||
REISERFS_I(inode)->i_trans_id = 0;
|
||||
REISERFS_I(inode)->i_jl = NULL;
|
||||
mutex_init(&(REISERFS_I(inode)->i_mmap));
|
||||
reiserfs_init_xattr_rwsem(inode);
|
||||
|
||||
if (stat_data_v1(ih)) {
|
||||
|
@ -1841,7 +1840,6 @@ int reiserfs_new_inode(struct reiserfs_transaction_handle *th,
|
|||
REISERFS_I(inode)->i_attrs =
|
||||
REISERFS_I(dir)->i_attrs & REISERFS_INHERIT_MASK;
|
||||
sd_attrs_to_i_attrs(REISERFS_I(inode)->i_attrs, inode);
|
||||
mutex_init(&(REISERFS_I(inode)->i_mmap));
|
||||
reiserfs_init_xattr_rwsem(inode);
|
||||
|
||||
/* key to search for correct place for new stat data */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue