Skip to content
Unverified Commit 33ab231f authored by Christian Brauner's avatar Christian Brauner
Browse files

fs: don't assume arguments are non-NULL

The helper is explicitly documented as locking zero, one, or two
arguments. While all current callers do pass non-NULL arguments there's
no need or requirement for them to do so according to the code and the
unlock_two_nondirectories() helper is pretty clear about it as well. So
only call WARN_ON_ONCE() if the checked inode is valid.

Fixes: 2454ad83

 ("fs: Restrict lock_two_nondirectories() to non-directory inodes")
Reviewed-by: default avatarJan Kara <jack@suse.cz>
Cc: Jan Kara <jack@suse.cz>
Message-Id: <20230703-vfs-rename-source-v1-2-37eebb29b65b@kernel.org>
Signed-off-by: default avatarChristian Brauner <brauner@kernel.org>
parent 66d8fc05
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