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>
This commit is contained in:

committed by
Theodore Ts'o

parent
e4d7f2d359
commit
e0f49d270d
@@ -1356,8 +1356,7 @@ retry:
|
||||
|
||||
block = 0;
|
||||
while (wsize < bufsize) {
|
||||
if (bh != NULL)
|
||||
brelse(bh);
|
||||
brelse(bh);
|
||||
csize = (bufsize - wsize) > blocksize ? blocksize :
|
||||
bufsize - wsize;
|
||||
bh = ext4_getblk(handle, ea_inode, block, 0);
|
||||
|
Reference in New Issue
Block a user