From: Marc Dionne Date: Sat, 29 Oct 2011 23:23:07 +0000 (-0400) Subject: Linux: 3.1: update RCU path walking detection in permission i_op X-Git-Tag: openafs-stable-1_8_0pre1~3112 X-Git-Url: http://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=4952df3f0359531e4a660c99c94c51eb0b169f59 Linux: 3.1: update RCU path walking detection in permission i_op The permission() inode operation changed again with kernel 3.1, back to the form it had before 2.6.38. This compiles fine, but is missing the new way of detecting when we get called in RCU path walking mode, resulting in system hangs. Change-Id: I9a9a0c13aa3b35d8fe2bd592e2bca8187eacacc5 Reviewed-on: http://gerrit.openafs.org/5740 Tested-by: BuildBot Reviewed-by: Derrick Brashear --- diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c index f37acb8..18be0ff 100644 --- a/src/afs/LINUX/osi_vnodeops.c +++ b/src/afs/LINUX/osi_vnodeops.c @@ -2354,10 +2354,13 @@ afs_linux_permission(struct inode *ip, int mode) cred_t *credp; int tmp = 0; + /* Check for RCU path walking */ #if defined(IOP_PERMISSION_TAKES_FLAGS) - /* We don't support RCU path walking */ if (flags & IPERM_FLAG_RCU) return -ECHILD; +#elif defined(MAY_NOT_BLOCK) + if (mode & MAY_NOT_BLOCK) + return -ECHILD; #endif credp = crref();