From 457303440042ad43e61652b6ca11c84fab390b82 Mon Sep 17 00:00:00 2001 From: Marc Dionne Date: Sat, 7 Nov 2009 10:51:52 -0500 Subject: [PATCH] Linux: always use afs_maybe_unlock_kernel In one error case in afs_linux_lookup unlock_kernel() is called directly instead of using the conditional "maybe" form. If the config is such that the BKL is not taken, this can result in an attempt to unlock when the lock has not been taken, and can cause an oops. Change-Id: I27d5db58e9b9d45d925b24e27bc43960499c6ead Reviewed-on: http://gerrit.openafs.org/790 Reviewed-by: Simon Wilkinson Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear --- src/afs/LINUX/osi_vnodeops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c index 3d65d8969..553e0700e 100644 --- a/src/afs/LINUX/osi_vnodeops.c +++ b/src/afs/LINUX/osi_vnodeops.c @@ -1073,7 +1073,7 @@ afs_linux_lookup(struct inode *dip, struct dentry *dp) dput(alias); } else { iput(ip); - unlock_kernel(); + afs_maybe_unlock_kernel(); crfree(credp); return alias; } -- 2.39.5