From: Peter Zijlstra Date: Tue, 6 Mar 2007 09:42:09 +0000 (-0800) Subject: [PATCH] mqueue: nested locking annotation X-Git-Tag: v2.6.21-rc3~40 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7a434814c7a6500b08bf4419ba8712b152d08d08;p=platform%2Fkernel%2Flinux-3.10.git [PATCH] mqueue: nested locking annotation Fix http://bugzilla.kernel.org/show_bug.cgi?id=8130 Signed-off-by: Peter Zijlstra Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/ipc/mqueue.c b/ipc/mqueue.c index 0b5ecbe..554ac36 100644 --- a/ipc/mqueue.c +++ b/ipc/mqueue.c @@ -731,7 +731,8 @@ asmlinkage long sys_mq_unlink(const char __user *u_name) if (IS_ERR(name)) return PTR_ERR(name); - mutex_lock(&mqueue_mnt->mnt_root->d_inode->i_mutex); + mutex_lock_nested(&mqueue_mnt->mnt_root->d_inode->i_mutex, + I_MUTEX_PARENT); dentry = lookup_one_len(name, mqueue_mnt->mnt_root, strlen(name)); if (IS_ERR(dentry)) { err = PTR_ERR(dentry);