ufs: make ufs_freespace() return signed
authorAl Viro <viro@zeniv.linux.org.uk>
Wed, 14 Jun 2017 19:36:31 +0000 (15:36 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 14 Jun 2017 19:36:31 +0000 (15:36 -0400)
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 <viro@zeniv.linux.org.uk>
fs/ufs/util.h

index 398019fb144816875f2c717c2252823a4dd76b99..1e1639f8a58bebe6eb3a2728283926b6907e7256 100644 (file)
@@ -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;
 }
 
 /*