From c199cecbce04842d639c9cc9b34646eac5ad9f7e Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Wed, 25 Sep 2013 18:01:36 +0400 Subject: [PATCH] simplefs_create_fs_object(): release mutexes when we can't acquire sb_lock We need more pretty code for this. --- simple.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/simple.c b/simple.c index 4e4d165..16a5400 100644 --- a/simple.c +++ b/simple.c @@ -542,6 +542,8 @@ static int simplefs_create_fs_object(struct inode *dir, struct dentry *dentry, inode_iterator = (struct simplefs_inode *)bh->b_data; if (mutex_lock_interruptible(&simplefs_sb_lock)) { + mutex_unlock(&simplefs_inodes_mgmt_lock); + mutex_unlock(&simplefs_directory_children_update_lock); printk(KERN_ERR "Failed to acquire mutex lock %s +%d\n", __FILE__, __LINE__); return -EINTR;