X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=fs%2Focfs2%2Fstackglue.c;h=07f348b8d721064a3753012dc22c7ab21a834d55;hb=d26acd92fa990764b72608a68224f46fac377032;hp=10e149ae5e3aad289f3070714ef5b8530078acf0;hpb=a9da4f7ed6a702996ac9d1bbaf1a3969a4c092b3;p=linux-2.6 diff --git a/fs/ocfs2/stackglue.c b/fs/ocfs2/stackglue.c index 10e149ae5e..07f348b8d7 100644 --- a/fs/ocfs2/stackglue.c +++ b/fs/ocfs2/stackglue.c @@ -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; }