Skip to content
Unverified Commit dff745c1 authored by Amir Goldstein's avatar Amir Goldstein Committed by Christian Brauner
Browse files

fs: move cleanup from init_file() into its callers

The use of file_free_rcu() in init_file() to free the struct that was
allocated by the caller was hacky and we got what we deserved.

Let init_file() and its callers take care of cleaning up each after
their own allocated resources on error.

Fixes: 62d53c4a

 ("fs: use backing_file container for internal files with "fake" f_path") # mainline only
Reported-and-tested-by: default avatar <syzbot+ada42aab05cf51b00e98@syzkaller.appspotmail.com>
Signed-off-by: default avatarAmir Goldstein <amir73il@gmail.com>
Message-Id: <20230701171134.239409-1-amir73il@gmail.com>
Signed-off-by: default avatarChristian Brauner <brauner@kernel.org>
parent 995b406c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment