]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Linux: 3.1: update RCU path walking detection in permission i_op
authorMarc Dionne <marc.c.dionne@gmail.com>
Sat, 29 Oct 2011 23:23:07 +0000 (19:23 -0400)
committerRuss Allbery <rra@debian.org>
Tue, 29 Nov 2011 01:20:32 +0000 (17:20 -0800)
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.

Reviewed-on: http://gerrit.openafs.org/5740
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 4952df3f0359531e4a660c99c94c51eb0b169f59)

Change-Id: Ibd497309e6699fb585cf70e618373e800b73cbb8
Reviewed-on: http://gerrit.openafs.org/6088
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit f129142dde2a2637b2e638ca0cca372a45188923)

src/afs/LINUX/osi_vnodeops.c

index 4c4009434ce2e3ac8203cb57048265ef47cf634f..1c33d2797a6d2f4c9333ee82cdbe2f216a65bea2 100644 (file)
@@ -2245,10 +2245,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();