diff options
| author | Fredric Cover <fredric.cover.lkernel@gmail.com> | 2026-05-13 13:19:15 -0700 |
|---|---|---|
| committer | Steve French <stfrench@microsoft.com> | 2026-05-21 11:16:09 -0500 |
| commit | dcd4313f0987d69c4134c12bbe3a8cdf795f6c1e (patch) | |
| tree | dcb93846e6f507044784ad347651a83a9e47883e | |
| parent | d1ebfce2c1d161186a82e77590bf7da2ea1bce91 (diff) | |
| download | linux-next-dcd4313f0987d69c4134c12bbe3a8cdf795f6c1e.tar.gz linux-next-dcd4313f0987d69c4134c12bbe3a8cdf795f6c1e.zip | |
smb: client: change allocation requirements in DUP_CTX_STR macro
Currently, the macro DUP_CTX_STR allocates new_ctx->field using
GFP_ATOMIC. DUP_CTX_STR is only used in smb3_fs_context_dup(), which
is never called in an atomic context. Using GFP_ATOMIC puts unnecessary
pressure on emergency memory pools.
Change GFP_ATOMIC to GFP_KERNEL.
Signed-off-by: Fredric Cover <fredric.cover.lkernel@gmail.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
| -rw-r--r-- | fs/smb/client/fs_context.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/smb/client/fs_context.c b/fs/smb/client/fs_context.c index 4c8b1b9ade8b..2f86158f85d7 100644 --- a/fs/smb/client/fs_context.c +++ b/fs/smb/client/fs_context.c @@ -420,7 +420,7 @@ static int parse_symlink_flavor(struct fs_context *fc, char *value, #define DUP_CTX_STR(field) \ do { \ if (ctx->field) { \ - new_ctx->field = kstrdup(ctx->field, GFP_ATOMIC); \ + new_ctx->field = kstrdup(ctx->field, GFP_KERNEL); \ if (new_ctx->field == NULL) { \ smb3_cleanup_fs_context_contents(new_ctx); \ return -ENOMEM; \ |
