Skip to content

Commit

Permalink
ufs: make ufs_freespace() return signed
Browse files Browse the repository at this point in the history
as it is, checking that its return value is <= 0 is useless and
that's how it's being used.

Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
Al Viro committed Jun 14, 2017
1 parent 96ecff1 commit fffd70f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/ufs/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -354,12 +354,12 @@ static inline void *ubh_get_data_ptr(struct ufs_sb_private_info *uspi,
* Determine the number of available frags given a
* percentage to hold in reserve.
*/
static inline u64
static inline s64
ufs_freespace(struct ufs_sb_private_info *uspi, int percentreserved)
{
return ufs_blkstofrags(uspi->cs_total.cs_nbfree) +
uspi->cs_total.cs_nffree -
(uspi->s_dsize * (percentreserved) / 100);
(uspi->s_dsize * percentreserved) / 100;
}

/*
Expand Down

0 comments on commit fffd70f

Please sign in to comment.