]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/ocfs2/stackglue.c
select: fix alpha OSF wrapper
[linux-2.6-omap-h63xx.git] / fs / ocfs2 / stackglue.c
index 10e149ae5e3aad289f3070714ef5b8530078acf0..07f348b8d721064a3753012dc22c7ab21a834d55 100644 (file)
@@ -97,13 +97,14 @@ static int ocfs2_stack_driver_request(const char *stack_name,
                goto out;
        }
 
-       /* Ok, the stack is pinned */
-       p->sp_count++;
        active_stack = p;
-
        rc = 0;
 
 out:
+       /* If we found it, pin it */
+       if (!rc)
+               active_stack->sp_count++;
+
        spin_unlock(&ocfs2_stack_lock);
        return rc;
 }