summaryrefslogtreecommitdiffstats
path: root/fs/ufs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2017-06-14 15:36:31 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2017-06-14 15:36:31 -0400
commitfffd70f58864f5a48b2c17d02730a460f86d4254 (patch)
tree9e6fa149e45009c5fdd338b0f0cc1bd63bbfebbf /fs/ufs
parent96ecff14225ad40a29f4d5cfa6bd9266c8e1e89a (diff)
ufs: make ufs_freespace() return signed
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>
Diffstat (limited to 'fs/ufs')
-rw-r--r--fs/ufs/util.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ufs/util.h b/fs/ufs/util.h
index 398019fb1448..1e1639f8a58b 100644
--- a/fs/ufs/util.h
+++ b/fs/ufs/util.h
@@ -354,12 +354,12 @@ static inline void *ubh_get_data_ptr(struct ufs_sb_private_info *uspi,
354 * Determine the number of available frags given a 354 * Determine the number of available frags given a
355 * percentage to hold in reserve. 355 * percentage to hold in reserve.
356 */ 356 */
357static inline u64 357static inline s64
358ufs_freespace(struct ufs_sb_private_info *uspi, int percentreserved) 358ufs_freespace(struct ufs_sb_private_info *uspi, int percentreserved)
359{ 359{
360 return ufs_blkstofrags(uspi->cs_total.cs_nbfree) + 360 return ufs_blkstofrags(uspi->cs_total.cs_nbfree) +
361 uspi->cs_total.cs_nffree - 361 uspi->cs_total.cs_nffree -
362 (uspi->s_dsize * (percentreserved) / 100); 362 (uspi->s_dsize * percentreserved) / 100;
363} 363}
364 364
365/* 365/*