source: trunk/server/common/patches/openafs-linux-3.1-rcu.patch @ 2139

Last change on this file since 2139 was 2066, checked in by achernya, 12 years ago
Merge branches/fc15-dev to trunk
File size: 1.5 KB
RevLine 
[2060]1From f129142dde2a2637b2e638ca0cca372a45188923 Mon Sep 17 00:00:00 2001
2From: Marc Dionne <marc.c.dionne@gmail.com>
3Date: Sat, 29 Oct 2011 19:23:07 -0400
4Subject: [PATCH] Linux: 3.1: update RCU path walking detection in permission i_op
5
6The permission() inode operation changed again with kernel 3.1,
7back to the form it had before 2.6.38.  This compiles fine,
8but is missing the new way of detecting when we get called in
9RCU path walking mode, resulting in system hangs.
10
11Reviewed-on: http://gerrit.openafs.org/5740
12Tested-by: BuildBot <buildbot@rampaginggeek.com>
13Reviewed-by: Derrick Brashear <shadow@dementix.org>
14(cherry picked from commit 4952df3f0359531e4a660c99c94c51eb0b169f59)
15
16Change-Id: Ibd497309e6699fb585cf70e618373e800b73cbb8
17Reviewed-on: http://gerrit.openafs.org/6088
18Tested-by: BuildBot <buildbot@rampaginggeek.com>
19Reviewed-by: Derrick Brashear <shadow@dementix.org>
20---
21 src/afs/LINUX/osi_vnodeops.c |    5 ++++-
22 1 files changed, 4 insertions(+), 1 deletions(-)
23
24diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c
25index e9215db..696146b 100644
26--- a/src/afs/LINUX/osi_vnodeops.c
27+++ b/src/afs/LINUX/osi_vnodeops.c
28@@ -2245,10 +2245,13 @@ afs_linux_permission(struct inode *ip, int mode)
29     cred_t *credp;
30     int tmp = 0;
31 
32+    /* Check for RCU path walking */
33 #if defined(IOP_PERMISSION_TAKES_FLAGS)
34-    /* We don't support RCU path walking */
35     if (flags & IPERM_FLAG_RCU)
36        return -ECHILD;
37+#elif defined(MAY_NOT_BLOCK)
38+    if (mode & MAY_NOT_BLOCK)
39+       return -ECHILD;
40 #endif
41 
42     credp = crref();
43--
441.7.2.5
45
Note: See TracBrowser for help on using the repository browser.