diff mbox series

[v2,3/3] fs/efs: Fix line breakage for C keywords

Message ID 20210205051429.553657-4-enbyamy@gmail.com (mailing list archive)
State New, archived
Headers show
Series fs/efs: Follow kernel style guide | expand

Commit Message

Amy Parker Feb. 5, 2021, 5:14 a.m. UTC
Some statements - such as if statements - are not broken into their 
lines correctly. For example, some are expressed on a single line. 
Single line if statements are expressely prohibited by the style guide. 
This patch corrects these violations.

Signed-off-by: Amy Parker <enbyamy@gmail.com>
---
 fs/efs/inode.c | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/fs/efs/inode.c b/fs/efs/inode.c
index 2cc55d514421..0099e6ad529a 100644
--- a/fs/efs/inode.c
+++ b/fs/efs/inode.c
@@ -193,7 +193,8 @@  efs_extent_check(efs_extent *ptr, efs_block_t block, struct efs_sb_info *sb) {
 
 	if ((block >= offset) && (block < offset+length)) {
 		return(sb->fs_start + start + block - offset);
-	} else {
+	}
+	else {
 		return 0;
 	}
 }
@@ -264,7 +265,8 @@  efs_block_t efs_map_block(struct inode *inode, efs_block_t block) {
 			/* should never happen */
 			pr_err("couldn't find direct extent for indirect extent %d (block %u)\n",
 			       cur, block);
-			if (bh) brelse(bh);
+			if (bh)
+				brelse(bh);
 			return 0;
 		}
 		
@@ -276,7 +278,8 @@  efs_block_t efs_map_block(struct inode *inode, efs_block_t block) {
 			(EFS_BLOCKSIZE / sizeof(efs_extent));
 
 		if (first || lastblock != iblock) {
-			if (bh) brelse(bh);
+			if (bh)
+				brelse(bh);
 
 			bh = sb_bread(inode->i_sb, iblock);
 			if (!bh) {
@@ -297,17 +300,20 @@  efs_block_t efs_map_block(struct inode *inode, efs_block_t block) {
 		if (ext.cooked.ex_magic != 0) {
 			pr_err("extent %d has bad magic number in block %d\n",
 			       cur, iblock);
-			if (bh) brelse(bh);
+			if (bh)
+				brelse(bh);
 			return 0;
 		}
 
 		if ((result = efs_extent_check(&ext, block, sb))) {
-			if (bh) brelse(bh);
+			if (bh)
+				brelse(bh);
 			in->lastextent = cur;
 			return result;
 		}
 	}
-	if (bh) brelse(bh);
+	if (bh)
+		brelse(bh);
 	pr_err("%s() failed to map block %u (indir)\n", __func__, block);
 	return 0;
 }