lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20250305074801.5026-1-hanchunchao@inspur.com>
Date: Wed, 5 Mar 2025 15:48:01 +0800
From: Charles Han <hanchunchao@...pur.com>
To: <willy@...radead.org>, <viro@...iv.linux.org.uk>, <josef@...icpanda.com>,
	<brauner@...nel.org>
CC: <linux-kernel@...r.kernel.org>, Charles Han <hanchunchao@...pur.com>
Subject: [PATCH] ufs: fix inconsistent indenting warning

Fix below inconsistent indenting smatch warning.
smatch warnings:
fs/ufs/inode.c:1063 ufs_alloc_lastblock() warn: inconsistent indenting
fs/ufs/inode.c:1077 ufs_alloc_lastblock() warn: inconsistent indenting

Signed-off-by: Charles Han <hanchunchao@...pur.com>
---
 fs/ufs/inode.c | 64 +++++++++++++++++++++++++-------------------------
 1 file changed, 32 insertions(+), 32 deletions(-)

diff --git a/fs/ufs/inode.c b/fs/ufs/inode.c
index 7dc38fdef2ea..e67475f6e0db 100644
--- a/fs/ufs/inode.c
+++ b/fs/ufs/inode.c
@@ -1060,41 +1060,41 @@ static int ufs_alloc_lastblock(struct inode *inode, loff_t size)
 	for (i = 0; i < end; ++i)
 		bh = bh->b_this_page;
 
-       err = ufs_getfrag_block(inode, lastfrag, bh, 1);
-
-       if (unlikely(err))
-	       goto out_unlock;
-
-       if (buffer_new(bh)) {
-	       clear_buffer_new(bh);
-	       clean_bdev_bh_alias(bh);
-	       /*
-		* we do not zeroize fragment, because of
-		* if it maped to hole, it already contains zeroes
-		*/
-	       set_buffer_uptodate(bh);
-	       mark_buffer_dirty(bh);
+	err = ufs_getfrag_block(inode, lastfrag, bh, 1);
+
+	if (unlikely(err))
+		goto out_unlock;
+
+	if (buffer_new(bh)) {
+		clear_buffer_new(bh);
+		clean_bdev_bh_alias(bh);
+		/*
+		 * we do not zeroize fragment, because of
+		 * if it maped to hole, it already contains zeroes
+		 */
+		set_buffer_uptodate(bh);
+		mark_buffer_dirty(bh);
 		folio_mark_dirty(folio);
-       }
-
-       if (lastfrag >= UFS_IND_FRAGMENT) {
-	       end = uspi->s_fpb - ufs_fragnum(lastfrag) - 1;
-	       phys64 = bh->b_blocknr + 1;
-	       for (i = 0; i < end; ++i) {
-		       bh = sb_getblk(sb, i + phys64);
-		       lock_buffer(bh);
-		       memset(bh->b_data, 0, sb->s_blocksize);
-		       set_buffer_uptodate(bh);
-		       mark_buffer_dirty(bh);
-		       unlock_buffer(bh);
-		       sync_dirty_buffer(bh);
-		       brelse(bh);
-	       }
-       }
+	}
+
+	if (lastfrag >= UFS_IND_FRAGMENT) {
+		end = uspi->s_fpb - ufs_fragnum(lastfrag) - 1;
+		phys64 = bh->b_blocknr + 1;
+		for (i = 0; i < end; ++i) {
+			bh = sb_getblk(sb, i + phys64);
+			lock_buffer(bh);
+			memset(bh->b_data, 0, sb->s_blocksize);
+			set_buffer_uptodate(bh);
+			mark_buffer_dirty(bh);
+			unlock_buffer(bh);
+			sync_dirty_buffer(bh);
+			brelse(bh);
+		}
+	}
 out_unlock:
-       ufs_put_locked_folio(folio);
+	ufs_put_locked_folio(folio);
 out:
-       return err;
+	return err;
 }
 
 static void ufs_truncate_blocks(struct inode *inode)
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ