From 7b49ae9dde87c86bfd04002c7103f40aa9ce2d39 Mon Sep 17 00:00:00 2001 From: Gabriel Francisco Date: Mon, 30 Nov 2020 05:22:02 +0000 Subject: [PATCH] compat: fix parent dir locking --- kernel/sy_old/sy_generic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/sy_old/sy_generic.c b/kernel/sy_old/sy_generic.c index a2867d67..b9635668 100644 --- a/kernel/sy_old/sy_generic.c +++ b/kernel/sy_old/sy_generic.c @@ -458,7 +458,7 @@ retry: goto exit1; #endif #ifdef HAS_INODE_LOCK_WRAPPERS - inode_lock_nested(dentry->d_inode, I_MUTEX_PARENT); + inode_lock_nested(parent->d_inode, I_MUTEX_PARENT); #else mutex_lock_nested(&parent->d_inode->i_mutex, I_MUTEX_PARENT); #endif @@ -493,7 +493,7 @@ exit3: dput(dentry); exit2: #ifdef HAS_INODE_LOCK_WRAPPERS - inode_unlock(dentry->d_inode); + inode_unlock(parent->d_inode); #else mutex_unlock(&parent->d_inode->i_mutex); #endif