Pull smb server fixes from Steve French: "Two small fixes: - fix potential deadlock - minor cleanup" * tag 'v7.0-rc-part2-ksmbd-server-fixes' of git://git.samba.org/ksmbd: ksmbd: call ksmbd_vfs_kern_path_end_removing() on some error paths smb: server: Remove duplicate include of misc.h
Unified · Split
| @@ -21,7 +21,6 @@ · 20 unmodified lines | |||
| 21 | #include "mgmt/user_session.h" | 21 | #include "mgmt/user_session.h" |
| 22 | #include "crypto_ctx.h" | 22 | #include "crypto_ctx.h" |
| 23 | #include "auth.h" | 23 | #include "auth.h" |
| 24 | #include "misc.h" | ||
| 25 | #include "stats.h" | 24 | #include "stats.h" |
| 26 | 25 | ||
| 27 | int ksmbd_debug_types; | 26 | int ksmbd_debug_types; |
| @@ -6115,14 +6115,14 @@ static int smb2_create_link(struct ksmbd_work *work, · 6114 unmodified lines | |||
| 6115 | rc = -EINVAL; | 6115 | rc = -EINVAL; |
| 6116 | ksmbd_debug(SMB, "cannot delete %s\n", | 6116 | ksmbd_debug(SMB, "cannot delete %s\n", |
| 6117 | link_name); | 6117 | link_name); |
| 6118 | goto out; | ||
| 6119 | } | 6118 | } |
| 6120 | } else { | 6119 | } else { |
| 6121 | rc = -EEXIST; | 6120 | rc = -EEXIST; |
| 6122 | ksmbd_debug(SMB, "link already exists\n"); | 6121 | ksmbd_debug(SMB, "link already exists\n"); |
| 6123 | goto out; | ||
| 6124 | } | 6122 | } |
| 6125 | ksmbd_vfs_kern_path_end_removing(&path); | 6123 | ksmbd_vfs_kern_path_end_removing(&path); |
| 6124 | if (rc) | ||
| 6125 | goto out; | ||
| 6126 | } | 6126 | } |
| 6127 | rc = ksmbd_vfs_link(work, target_name, link_name); | 6127 | rc = ksmbd_vfs_link(work, target_name, link_name); |
| 6128 | if (rc) | 6128 | if (rc) |