mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-23 00:20:52 -05:00
get_file_rcu(): no need to check for NULL separately
IS_ERR(NULL) is false and IS_ERR() already comes with unlikely()... Reviewed-by: Christian Brauner <brauner@kernel.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
c4aab26253
commit
613aee94dd
1 changed files with 2 additions and 7 deletions
|
@ -920,13 +920,8 @@ struct file *get_file_rcu(struct file __rcu **f)
|
|||
struct file __rcu *file;
|
||||
|
||||
file = __get_file_rcu(f);
|
||||
if (unlikely(!file))
|
||||
return NULL;
|
||||
|
||||
if (unlikely(IS_ERR(file)))
|
||||
continue;
|
||||
|
||||
return file;
|
||||
if (!IS_ERR(file))
|
||||
return file;
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(get_file_rcu);
|
||||
|
|
Loading…
Reference in a new issue