diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2015-06-16 18:43:08 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-07-06 17:39:27 -0400 |
commit | 6a799d3514217d217b4e74a1ee4f016428582dc5 (patch) | |
tree | b9942374de2b82508a7174b7684b6dce886a75ff | |
parent | dff7cfd36e305488421d82a0ed3dd0209c333745 (diff) |
ufs: ufs_trunc_direct() always returns 0
make it return void
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | fs/ufs/truncate.c | 9 |
1 files 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, |