diff options
| author | Stefan Metzmacher <metze@samba.org> | 2025-09-11 20:41:53 +0300 |
|---|---|---|
| committer | Steve French <stfrench@microsoft.com> | 2026-04-16 05:58:18 +0300 |
| commit | 64d6bd25339bb0820556af6a46e41a23a34a2ed3 (patch) | |
| tree | 41af1728a80766f493703ac74837f0b39741703d | |
| parent | 66a840b3ba538142fec5895cb197b1ec9f3a717c (diff) | |
| download | linux-64d6bd25339bb0820556af6a46e41a23a34a2ed3.tar.xz | |
smb: smbdirect: introduce smbdirect_socket.{send,recv}_io.mem.gfp_mask
This will allow common code to be split out while still using the
gfp_mask currently used.
Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Cc: Namjae Jeon <linkinjeon@kernel.org>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
| -rw-r--r-- | fs/smb/common/smbdirect/smbdirect_socket.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/fs/smb/common/smbdirect/smbdirect_socket.h b/fs/smb/common/smbdirect/smbdirect_socket.h index 44506fc5cb92..ef0c48814311 100644 --- a/fs/smb/common/smbdirect/smbdirect_socket.h +++ b/fs/smb/common/smbdirect/smbdirect_socket.h @@ -158,8 +158,9 @@ struct smbdirect_socket { * smbdirect_send_io buffers */ struct { - struct kmem_cache *cache; - mempool_t *pool; + struct kmem_cache *cache; + mempool_t *pool; + gfp_t gfp_mask; } mem; /* @@ -223,8 +224,9 @@ struct smbdirect_socket { * smbdirect_recv_io buffers */ struct { - struct kmem_cache *cache; - mempool_t *pool; + struct kmem_cache *cache; + mempool_t *pool; + gfp_t gfp_mask; } mem; /* @@ -505,6 +507,8 @@ static __always_inline void smbdirect_socket_init(struct smbdirect_socket *sc) INIT_DELAYED_WORK(&sc->idle.timer_work, __smbdirect_socket_disabled_work); disable_delayed_work_sync(&sc->idle.timer_work); + sc->send_io.mem.gfp_mask = GFP_KERNEL; + atomic_set(&sc->send_io.bcredits.count, 0); init_waitqueue_head(&sc->send_io.bcredits.wait_queue); @@ -518,6 +522,8 @@ static __always_inline void smbdirect_socket_init(struct smbdirect_socket *sc) init_waitqueue_head(&sc->send_io.pending.dec_wait_queue); init_waitqueue_head(&sc->send_io.pending.zero_wait_queue); + sc->recv_io.mem.gfp_mask = GFP_KERNEL; + INIT_LIST_HEAD(&sc->recv_io.free.list); spin_lock_init(&sc->recv_io.free.lock); |
