summaryrefslogtreecommitdiff
path: root/fs/ufs/balloc.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2017-06-14 16:36:29 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2017-06-14 16:43:03 -0400
commitc596961d1b4ccc6f15754fe5a49c37ac6da57145 (patch)
tree984ec943e69b3f61920bc4eda674216a49552108 /fs/ufs/balloc.c
parentb451cec4bbd913688f5381efad407762a64a92ce (diff)
ufs: fix s_size/s_dsize users
For UFS2 we need 64bit variants; we even store them in uspi, but use 32bit ones instead. One wrinkle is in handling of reserved space - recalculating it every time had been stupid all along, but now it would become really ugly. Just calculate it once... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ufs/balloc.c')
-rw-r--r--fs/ufs/balloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ufs/balloc.c b/fs/ufs/balloc.c
index 52d1ef415f6f..af0473a851af 100644
--- a/fs/ufs/balloc.c
+++ b/fs/ufs/balloc.c
@@ -400,7 +400,7 @@ u64 ufs_new_fragments(struct inode *inode, void *p, u64 fragment,
/*
* There is not enough space for user on the device
*/
- if (unlikely(ufs_freespace(uspi, uspi->s_minfree) <= 0)) {
+ if (unlikely(ufs_freefrags(uspi) <= uspi->s_root_blocks)) {
if (!capable(CAP_SYS_RESOURCE)) {
mutex_unlock(&UFS_SB(sb)->s_lock);
UFSD("EXIT (FAILED)\n");