[PATCH] ufs: fix inconsistent indenting warning
From: Charles Han
Date: Wed Mar 05 2025 - 02:48:18 EST
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@xxxxxxxxxx>
---
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