diff options
author | Namjae Jeon <linkinjeon@kernel.org> | 2024-11-22 16:33:25 +0900 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2024-11-25 18:58:02 -0600 |
commit | 0066f623bce8f98b69b752ee03d46a5047c281b8 (patch) | |
tree | 86583913e44e47b85f9670344f814523383538f0 /fs/smb/server/smb_common.c | |
parent | d6eb09fb46707a060209f077abede8c0e2c21b73 (diff) |
ksmbd: use __GFP_RETRY_MAYFAIL
Prefer to report ENOMEM rather than incur the oom for allocations in
ksmbd. __GFP_NORETRY could not achieve that, It would fail the allocations
just too easily. __GFP_RETRY_MAYFAIL will keep retrying the allocation
until there is no more progress and fail the allocation instead go OOM
and let the caller to deal with it.
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/smb/server/smb_common.c')
-rw-r--r-- | fs/smb/server/smb_common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/smb/server/smb_common.c b/fs/smb/server/smb_common.c index c3e4e0e95492..4e6f169fcf83 100644 --- a/fs/smb/server/smb_common.c +++ b/fs/smb/server/smb_common.c @@ -358,7 +358,7 @@ static int smb1_check_user_session(struct ksmbd_work *work) static int smb1_allocate_rsp_buf(struct ksmbd_work *work) { work->response_buf = kzalloc(MAX_CIFS_SMALL_BUFFER_SIZE, - GFP_KERNEL); + KSMBD_DEFAULT_GFP); work->response_sz = MAX_CIFS_SMALL_BUFFER_SIZE; if (!work->response_buf) { |