summaryrefslogtreecommitdiff
path: root/fs/f2fs/sysfs.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2024-02-07 00:56:27 +0300
committerJaegeuk Kim <jaegeuk@kernel.org>2024-02-27 20:41:12 +0300
commita60108f7dfb5867da1ad9c777d2fbbe47e4dbdd7 (patch)
treedc87eb96c6429d6dd4a29350fe2380158782dc47 /fs/f2fs/sysfs.c
parent87161a2b0aed9e9b614bbf6fe8697ad560ceb0cb (diff)
downloadlinux-a60108f7dfb5867da1ad9c777d2fbbe47e4dbdd7.tar.xz
f2fs: use BLKS_PER_SEG, BLKS_PER_SEC, and SEGS_PER_SEC
No functional change. Reviewed-by: Daeho Jeong <daehojeong@google.com> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/sysfs.c')
-rw-r--r--fs/f2fs/sysfs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c
index a7ec55c7bb20..906d2af2d849 100644
--- a/fs/f2fs/sysfs.c
+++ b/fs/f2fs/sysfs.c
@@ -493,8 +493,8 @@ out:
spin_lock(&sbi->stat_lock);
if (t > (unsigned long)(sbi->user_block_count -
F2FS_OPTION(sbi).root_reserved_blocks -
- sbi->blocks_per_seg *
- SM_I(sbi)->additional_reserved_segments)) {
+ (SM_I(sbi)->additional_reserved_segments <<
+ sbi->log_blocks_per_seg))) {
spin_unlock(&sbi->stat_lock);
return -EINVAL;
}
@@ -551,7 +551,7 @@ out:
}
if (!strcmp(a->attr.name, "migration_granularity")) {
- if (t == 0 || t > sbi->segs_per_sec)
+ if (t == 0 || t > SEGS_PER_SEC(sbi))
return -EINVAL;
}