From 6a799d3514217d217b4e74a1ee4f016428582dc5 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 16 Jun 2015 18:43:08 -0400 Subject: [PATCH] ufs: ufs_trunc_direct() always returns 0 make it return void Signed-off-by: Al Viro --- fs/ufs/truncate.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/fs/ufs/truncate.c b/fs/ufs/truncate.c index ad34b7f4b499..c56f4ef1cb7a 100644 --- a/fs/ufs/truncate.c +++ b/fs/ufs/truncate.c @@ -63,7 +63,7 @@ #define DIRECT_FRAGMENT ((inode->i_size + uspi->s_fsize - 1) >> uspi->s_fshift) -static int ufs_trunc_direct(struct inode *inode) +static void ufs_trunc_direct(struct inode *inode) { struct ufs_inode_info *ufsi = UFS_I(inode); struct super_block * sb; @@ -72,7 +72,6 @@ static int ufs_trunc_direct(struct inode *inode) u64 frag1, frag2, frag3, frag4, block1, block2; unsigned frag_to_free, free_count; unsigned i, tmp; - int retry; UFSD("ENTER: ino %lu\n", inode->i_ino); @@ -81,7 +80,6 @@ static int ufs_trunc_direct(struct inode *inode) frag_to_free = 0; free_count = 0; - retry = 0; frag1 = DIRECT_FRAGMENT; frag4 = min_t(u64, UFS_NDIR_FRAGMENT, ufsi->i_lastfrag); @@ -168,7 +166,6 @@ next1: next3: UFSD("EXIT: ino %lu\n", inode->i_ino); - return retry; } @@ -467,8 +464,8 @@ static void __ufs_truncate_blocks(struct inode *inode) mutex_lock(&ufsi->truncate_mutex); while (1) { - retry = ufs_trunc_direct(inode); - retry |= ufs_trunc_indirect(inode, UFS_IND_BLOCK, + ufs_trunc_direct(inode); + retry = ufs_trunc_indirect(inode, UFS_IND_BLOCK, ufs_get_direct_data_ptr(uspi, ufsi, UFS_IND_BLOCK)); retry |= ufs_trunc_dindirect(inode, UFS_IND_BLOCK + uspi->s_apb, -- 2.39.2