All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] reiserfs: Delete an unnecessary check before brelse()
@ 2019-09-03 18:42 ` Markus Elfring
  0 siblings, 0 replies; 2+ messages in thread
From: Markus Elfring @ 2019-09-03 18:42 UTC (permalink / raw)
  To: reiserfs-devel, Al Viro, Darrick J. Wong, Deepa Dinamani, Jeff Layton
  Cc: LKML, kernel-janitors

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 3 Sep 2019 20:00:16 +0200

The brelse() function tests whether its argument is NULL
and then returns immediately.
Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 fs/reiserfs/super.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
index d69b4ac0ae2f..b412ef9a24a6 100644
--- a/fs/reiserfs/super.c
+++ b/fs/reiserfs/super.c
@@ -2229,8 +2229,7 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent)
 	reiserfs_cancel_old_flush(s);

 	reiserfs_free_bitmap_cache(s);
-	if (SB_BUFFER_WITH_SB(s))
-		brelse(SB_BUFFER_WITH_SB(s));
+	brelse(SB_BUFFER_WITH_SB(s));
 #ifdef CONFIG_QUOTA
 	{
 		int j;
--
2.23.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] reiserfs: Delete an unnecessary check before brelse()
@ 2019-09-03 18:42 ` Markus Elfring
  0 siblings, 0 replies; 2+ messages in thread
From: Markus Elfring @ 2019-09-03 18:42 UTC (permalink / raw)
  To: reiserfs-devel, Al Viro, Darrick J. Wong, Deepa Dinamani, Jeff Layton
  Cc: LKML, kernel-janitors

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 3 Sep 2019 20:00:16 +0200

The brelse() function tests whether its argument is NULL
and then returns immediately.
Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 fs/reiserfs/super.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
index d69b4ac0ae2f..b412ef9a24a6 100644
--- a/fs/reiserfs/super.c
+++ b/fs/reiserfs/super.c
@@ -2229,8 +2229,7 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent)
 	reiserfs_cancel_old_flush(s);

 	reiserfs_free_bitmap_cache(s);
-	if (SB_BUFFER_WITH_SB(s))
-		brelse(SB_BUFFER_WITH_SB(s));
+	brelse(SB_BUFFER_WITH_SB(s));
 #ifdef CONFIG_QUOTA
 	{
 		int j;
--
2.23.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-09-03 18:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-03 18:42 [PATCH] reiserfs: Delete an unnecessary check before brelse() Markus Elfring
2019-09-03 18:42 ` Markus Elfring

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.