]> www.infradead.org Git - users/willy/xarray.git/commitdiff
gfs2: Fix fall-through warnings for Clang
authorGustavo A. R. Silva <gustavoars@kernel.org>
Fri, 20 Nov 2020 18:25:03 +0000 (12:25 -0600)
committerAndreas Gruenbacher <agruenba@redhat.com>
Tue, 20 Apr 2021 20:38:21 +0000 (22:38 +0200)
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple
warnings by explicitly adding multiple goto statements instead of just
letting the code fall through to the next case.

Link: https://github.com/KSPP/linux/issues/115
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/inode.c
fs/gfs2/recovery.c

index b44b4873b35f235f0e3be164da000fedc598b334..f7f9ee723617935bd9ac44091bf39f7c193be15c 100644 (file)
@@ -963,6 +963,7 @@ static int gfs2_link(struct dentry *old_dentry, struct inode *dir,
                break;
        case 0:
                error = -EEXIST;
+               goto out_gunlock;
        default:
                goto out_gunlock;
        }
@@ -1508,6 +1509,7 @@ static int gfs2_rename(struct inode *odir, struct dentry *odentry,
                        break;
                case 0:
                        error = -EEXIST;
+                       goto out_gunlock;
                default:
                        goto out_gunlock;
                }
index 4f3fd351c14078446177c867444b33e20f65c46e..016ed1b2ca1df4fab8d2a2f119222503bab165f8 100644 (file)
@@ -438,6 +438,7 @@ void gfs2_recover_func(struct work_struct *work)
                case GLR_TRYFAILED:
                        fs_info(sdp, "jid=%u: Busy\n", jd->jd_jid);
                        error = 0;
+                       goto fail;
 
                default:
                        goto fail;