gfs2: Remove unnecessary NULL check before free_percpu()
authorChen Ni <nichen@iscas.ac.cn>
Thu, 17 Apr 2025 08:38:39 +0000 (16:38 +0800)
committerAndreas Gruenbacher <agruenba@redhat.com>
Mon, 21 Apr 2025 16:20:36 +0000 (18:20 +0200)
free_percpu() checks for NULL pointers internally.
Remove unneeded NULL check here.

Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/ops_fstype.c

index ea5b3c5c6e1c02840ca3d0a2e6d45710a1a02c3b..8f9bb6677db78c6d02709f5516f42507148269cc 100644 (file)
@@ -64,8 +64,7 @@ static void gfs2_tune_init(struct gfs2_tune *gt)
 
 void free_sbd(struct gfs2_sbd *sdp)
 {
-       if (sdp->sd_lkstats)
-               free_percpu(sdp->sd_lkstats);
+       free_percpu(sdp->sd_lkstats);
        kfree(sdp);
 }