[PATCH v2] ufs: fix deadlocks introduced by sb mutex merge

2014-09-02 Thread Alexey Khoroshilov
Commit 0244756edc4b ("ufs: sb mutex merge + mutex_destroy") introduces deadlocks in ufs_new_inode() and ufs_free_inode(). Most callers of that functions acqure the mutex by themselves and ufs_{new,free}_inode() do that via lock_ufs(), i.e we have an unavoidable double lock. The patch proposes to

[PATCH v2] ufs: fix deadlocks introduced by sb mutex merge

2014-09-02 Thread Alexey Khoroshilov
Commit 0244756edc4b (ufs: sb mutex merge + mutex_destroy) introduces deadlocks in ufs_new_inode() and ufs_free_inode(). Most callers of that functions acqure the mutex by themselves and ufs_{new,free}_inode() do that via lock_ufs(), i.e we have an unavoidable double lock. The patch proposes to