mirror of
https://github.com/torvalds/linux.git
synced 2026-11-28 09:22:27 +00:00
Commitc54b386969("VFS: Change vfs_mkdir() to return the dentry.") changed cachefiles_get_directory, replacing "subdir" with a ERR_PTR from the result of cachefiles_inject_write_error, which is either 0 or some error code. This causes an oops when the resulting pointer is passed to vfs_mkdir. Use a similar pattern to what is used earlier in the function; replace subdir with either the return value from vfs_mkdir, or the ERR_PTR of the cachefiles_inject_write_error() return value, but only if it is non zero. Fixes:c54b386969("VFS: Change vfs_mkdir() to return the dentry.") cc: [email protected] Signed-off-by: Marc Dionne <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Christian Brauner <[email protected]>