summaryrefslogtreecommitdiffstats
path: root/fs/gfs2/inode.c
diff options
context:
space:
mode:
authorGustavo A. R. Silva <gustavoars@kernel.org>2020-11-20 12:25:03 -0600
committerAndreas Gruenbacher <agruenba@redhat.com>2021-04-20 22:38:21 +0200
commite5966cf20f0c7e40fd8c208ba1614e1a35a8deee (patch)
tree9cecdef2d451791e17f19c867d6fa7d969c51931 /fs/gfs2/inode.c
parentc551f66c5dfefd00687f7567183fec6889ba46a3 (diff)
downloadlinux-e5966cf20f0c7e40fd8c208ba1614e1a35a8deee.tar.gz
linux-e5966cf20f0c7e40fd8c208ba1614e1a35a8deee.tar.bz2
linux-e5966cf20f0c7e40fd8c208ba1614e1a35a8deee.zip
gfs2: Fix fall-through warnings for Clang
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>
Diffstat (limited to 'fs/gfs2/inode.c')
-rw-r--r--fs/gfs2/inode.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
index b44b4873b35f..f7f9ee723617 100644
--- a/fs/gfs2/inode.c
+++ b/fs/gfs2/inode.c
@@ -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;
}