GFS2: Update handling of DLM return codes to match reality
authorSteven Whitehouse <swhiteho@redhat.com>
Wed, 8 Sep 2010 09:09:25 +0000 (10:09 +0100)
committerSteven Whitehouse <swhiteho@redhat.com>
Mon, 20 Sep 2010 10:20:12 +0000 (11:20 +0100)
GFS2's idea of which return codes it needs to handle was based
upon those listed in dlm.h. Those didn't cover all the possible
codes and listed some which never happen. This updates GFS2 to
handle all the codes which can actually be returned from the
DLM under various circumstances.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
fs/gfs2/lock_dlm.c

index 0e0470ed34c273a341aed5860191bfadf42b41e5..1c09425b45fd728ba52c1f5f49c3feac187640a2 100644 (file)
@@ -42,9 +42,9 @@ static void gdlm_ast(void *arg)
                ret |= LM_OUT_CANCELED;
                goto out;
        case -EAGAIN: /* Try lock fails */
+       case -EDEADLK: /* Deadlock detected */
                goto out;
-       case -EINVAL: /* Invalid */
-       case -ENOMEM: /* Out of memory */
+       case -ETIMEDOUT: /* Canceled due to timeout */
                ret |= LM_OUT_ERROR;
                goto out;
        case 0: /* Success */
This page took 0.024937 seconds and 5 git commands to generate.