]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
afs: destroy work queue on init failure
authorDan Carpenter <error27@gmail.com>
Wed, 11 Aug 2010 01:03:27 +0000 (18:03 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 11 Aug 2010 15:59:22 +0000 (08:59 -0700)
We can clean up the work queue on this error path.  This function is
called from afs_init().

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/afs/rxrpc.c

index 67cf810e0fd6e6cbadde116cf3916555d96226bb..654d8fdbf01f31ebd2f7ad05d7145ca024bee144 100644 (file)
@@ -100,6 +100,7 @@ int afs_open_socket(void)
        ret = kernel_bind(socket, (struct sockaddr *) &srx, sizeof(srx));
        if (ret < 0) {
                sock_release(socket);
+               destroy_workqueue(afs_async_calls);
                _leave(" = %d [bind]", ret);
                return ret;
        }