aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/extents.c
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2020-06-13 19:12:24 +0200
committerTheodore Ts'o <tytso@mit.edu>2020-08-06 00:08:56 -0400
commite0f49d270d9d04beec113aa7cfacac6bddcb5765 (patch)
tree3a663eed64cf3194c2521c2ef87c5ff63441147d /fs/ext4/extents.c
parente4d7f2d3593e703a4d58b813f332a5c2aef5106f (diff)
downloadlinux-e0f49d270d9d04beec113aa7cfacac6bddcb5765.tar.gz
ext4: delete unnecessary checks before brelse()
The brelse() function tests whether its argument is NULL and then returns immediately. Thus remove the tests which are not needed around the shown calls. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Reviewed-by: Ritesh Harjani <riteshh@linux.ibm.com> Link: https://lore.kernel.org/r/0d713702-072f-a89c-20ec-ca70aa83a432@web.de Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/extents.c')
-rw-r--r--fs/ext4/extents.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 1106ee17aa217..4af3f36c8351d 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -693,10 +693,8 @@ void ext4_ext_drop_refs(struct ext4_ext_path *path)
return;
depth = path->p_depth;
for (i = 0; i <= depth; i++, path++) {
- if (path->p_bh) {
- brelse(path->p_bh);
- path->p_bh = NULL;
- }
+ brelse(path->p_bh);
+ path->p_bh = NULL;
}
}