Skip to content

Commit e5966cf

Browse files
GustavoARSilvaAndreas Gruenbacher
authored andcommitted
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: KSPP#115 Signed-off-by: Gustavo A. R. Silva <[email protected]> Signed-off-by: Andreas Gruenbacher <[email protected]>
1 parent c551f66 commit e5966cf

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

fs/gfs2/inode.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -963,6 +963,7 @@ static int gfs2_link(struct dentry *old_dentry, struct inode *dir,
963963
break;
964964
case 0:
965965
error = -EEXIST;
966+
goto out_gunlock;
966967
default:
967968
goto out_gunlock;
968969
}
@@ -1508,6 +1509,7 @@ static int gfs2_rename(struct inode *odir, struct dentry *odentry,
15081509
break;
15091510
case 0:
15101511
error = -EEXIST;
1512+
goto out_gunlock;
15111513
default:
15121514
goto out_gunlock;
15131515
}

fs/gfs2/recovery.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,7 @@ void gfs2_recover_func(struct work_struct *work)
438438
case GLR_TRYFAILED:
439439
fs_info(sdp, "jid=%u: Busy\n", jd->jd_jid);
440440
error = 0;
441+
goto fail;
441442

442443
default:
443444
goto fail;

0 commit comments

Comments
 (0)