Whamcloud - gitweb
. fixed assertion when called from interrupt handler (allocating lib_msg_t)
authoreeb <eeb>
Wed, 7 Jan 2004 13:26:29 +0000 (13:26 +0000)
committereeb <eeb>
Wed, 7 Jan 2004 13:26:29 +0000 (13:26 +0000)
lnet/include/linux/kp30.h
lustre/portals/include/linux/kp30.h

index 815375c..63eaee7 100644 (file)
@@ -282,7 +282,9 @@ do {                                                                          \
 
 #define PORTAL_ALLOC_GFP(ptr, size, mask)                                 \
 do {                                                                      \
-        LASSERT (!in_interrupt());                                        \
+        LASSERT (!in_interrupt() ||                                       \
+                 (size <= PORTAL_VMALLOC_SIZE &&                          \
+                  (mask & __GFP_WAIT) == 0));                             \
         if ((size) > PORTAL_VMALLOC_SIZE)                                 \
                 (ptr) = vmalloc(size);                                    \
         else                                                              \
index 815375c..63eaee7 100644 (file)
@@ -282,7 +282,9 @@ do {                                                                          \
 
 #define PORTAL_ALLOC_GFP(ptr, size, mask)                                 \
 do {                                                                      \
-        LASSERT (!in_interrupt());                                        \
+        LASSERT (!in_interrupt() ||                                       \
+                 (size <= PORTAL_VMALLOC_SIZE &&                          \
+                  (mask & __GFP_WAIT) == 0));                             \
         if ((size) > PORTAL_VMALLOC_SIZE)                                 \
                 (ptr) = vmalloc(size);                                    \
         else                                                              \