diff options
| author | Thorsten Blum <thorsten.blum@linux.dev> | 2026-03-18 01:12:21 +0100 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2026-03-18 10:55:43 +0100 |
| commit | f8909447894aea7660c84c9d599ffd6b9a3772da (patch) | |
| tree | faf528d5585d6b9e66410b62b66e6d634fd437b8 /drivers/message/i2o/git@git.tavy.me:linux.git | |
| parent | d227786ab1119669df4dc333a61510c52047cce4 (diff) | |
autofs: replace manual symlink buffer allocation in autofs_dir_symlink
The symlink name was previously duplicated using an explicit kmalloc()
followed by strcpy(), which is deprecated [1]. Replace this open-coded
string duplication with kstrdup(), which allocates and copies the
symlink name with a single helper function.
Remove the local variable 'size' and set 'i_size' directly using
strlen(cp), which is equivalent to the previous value of 'size'.
This simplifies the code, uses common string-handling helpers, and
removes the deprecated use of strcpy().
Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strcpy [1]
Acked-by: Ian Kent <raven@themaw.net>
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20260318001219.2354-3-thorsten.blum@linux.dev
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'drivers/message/i2o/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
