diff options
author | Luís Henriques <lhenriques@suse.de> | 2023-09-28 18:23:41 +0300 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2023-10-19 12:02:48 +0300 |
commit | 6036c5f1317526890925576f0efcbc427a32a2ae (patch) | |
tree | 92aa6e21c454e5acf60f7eb83eccf11a0d96bfd3 /fs/file_table.c | |
parent | 85fadf89e5708d74c4923e9ceeca4b9df0e000bb (diff) | |
download | linux-6036c5f1317526890925576f0efcbc427a32a2ae.tar.xz |
fs: simplify misleading code to remove ambiguity regarding ihold()/iput()
Because 'inode' is being initialised before checking if 'dentry' is negative
it looks like an extra iput() on 'inode' may happen since the ihold() is
done only if the dentry is *not* negative. In reality this doesn't happen
because d_is_negative() is never true if ->d_inode is NULL. This patch only
makes the code easier to understand, as I was initially mislead by it.
Signed-off-by: Luís Henriques <lhenriques@suse.de>
Link: https://lore.kernel.org/r/20230928152341.303-1-lhenriques@suse.de
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/file_table.c')
0 files changed, 0 insertions, 0 deletions