projects
/
platform
/
kernel
/
linux-starfive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
smb: client: fix potential deadlock when releasing mids
[platform/kernel/linux-starfive.git]
/
fs
/
smb
/
client
/
transport.c
diff --git
a/fs/smb/client/transport.c
b/fs/smb/client/transport.c
index
14710af
..
d553b7a
100644
(file)
--- a/
fs/smb/client/transport.c
+++ b/
fs/smb/client/transport.c
@@
-76,7
+76,7
@@
alloc_mid(const struct smb_hdr *smb_buffer, struct TCP_Server_Info *server)
return temp;
}
return temp;
}
-
static
void __release_mid(struct kref *refcount)
+void __release_mid(struct kref *refcount)
{
struct mid_q_entry *midEntry =
container_of(refcount, struct mid_q_entry, refcount);
{
struct mid_q_entry *midEntry =
container_of(refcount, struct mid_q_entry, refcount);
@@
-156,15
+156,6
@@
static void __release_mid(struct kref *refcount)
mempool_free(midEntry, cifs_mid_poolp);
}
mempool_free(midEntry, cifs_mid_poolp);
}
-void release_mid(struct mid_q_entry *mid)
-{
- struct TCP_Server_Info *server = mid->server;
-
- spin_lock(&server->mid_lock);
- kref_put(&mid->refcount, __release_mid);
- spin_unlock(&server->mid_lock);
-}
-
void
delete_mid(struct mid_q_entry *mid)
{
void
delete_mid(struct mid_q_entry *mid)
{