diff options
Diffstat (limited to 'fs/ufs/util.h')
-rw-r--r-- | fs/ufs/util.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/fs/ufs/util.h b/fs/ufs/util.h index eacd5e37b8e6..99bfd6bba6d0 100644 --- a/fs/ufs/util.h +++ b/fs/ufs/util.h | |||
@@ -306,9 +306,13 @@ static inline void *get_usb_offset(struct ufs_sb_private_info *uspi, | |||
306 | * Determine the number of available frags given a | 306 | * Determine the number of available frags given a |
307 | * percentage to hold in reserve. | 307 | * percentage to hold in reserve. |
308 | */ | 308 | */ |
309 | #define ufs_freespace(usb, percentreserved) \ | 309 | static inline u64 |
310 | (ufs_blkstofrags(fs32_to_cpu(sb, (usb)->fs_cstotal.cs_nbfree)) + \ | 310 | ufs_freespace(struct ufs_sb_private_info *uspi, int percentreserved) |
311 | fs32_to_cpu(sb, (usb)->fs_cstotal.cs_nffree) - (uspi->s_dsize * (percentreserved) / 100)) | 311 | { |
312 | return ufs_blkstofrags(uspi->cs_total.cs_nbfree) + | ||
313 | uspi->cs_total.cs_nffree - | ||
314 | (uspi->s_dsize * (percentreserved) / 100); | ||
315 | } | ||
312 | 316 | ||
313 | /* | 317 | /* |
314 | * Macros to access cylinder group array structures | 318 | * Macros to access cylinder group array structures |