Thread (134 messages) 134 messages, 10 authors, 2024-11-11

Re: [PATCH 05/39] regularize emptiness checks in fini_module(2) and vfs_dedupe_file_range()

From: Christian Brauner <brauner@kernel.org>
Date: 2024-08-07 10:10:29
Also in: bpf, cgroups, kvm, linux-fsdevel

On Tue, Jul 30, 2024 at 01:15:51AM GMT, viro@kernel.org wrote:
From: Al Viro <viro@zeniv.linux.org.uk>

Currently all emptiness checks are done as fd_file(...) in boolean
context (usually something like if (!fd_file(f))...); those will be
taken care of later.

However, there's a couple of places where we do those checks as
'store fd_file(...) into a variable, then check if this variable is
NULL' and those are harder to spot.

Get rid of those now.

use fd_empty() instead of extracting file and then checking it for NULL.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
Reviewed-by: Christian Brauner <brauner@kernel.org>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help