summaryrefslogtreecommitdiff
path: root/fs/adfs/super.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2019-12-09 11:08:34 +0000
committerAl Viro <viro@zeniv.linux.org.uk>2020-01-20 20:12:40 -0500
commite6160e469f56a23cb69e1dc37aa0d895bf29ac24 (patch)
treec1f9c669869837ac2e66c035b315742486be067f /fs/adfs/super.c
parentf75d398d6ee61b04c16124e3eddd786526bc7d40 (diff)
downloadlwn-e6160e469f56a23cb69e1dc37aa0d895bf29ac24.tar.gz
lwn-e6160e469f56a23cb69e1dc37aa0d895bf29ac24.zip
fs/adfs: map: rename adfs_map_free() to adfs_map_statfs()
adfs_map_free() is not obvious whether it is freeing the map or returning the number of free blocks on the filesystem. Rename it to the more generic statfs() to make it clear that it's a statistic function. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/adfs/super.c')
-rw-r--r--fs/adfs/super.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/adfs/super.c b/fs/adfs/super.c
index 4091adb2c7ff..458824e0ca83 100644
--- a/fs/adfs/super.c
+++ b/fs/adfs/super.c
@@ -204,16 +204,13 @@ static int adfs_statfs(struct dentry *dentry, struct kstatfs *buf)
{
struct super_block *sb = dentry->d_sb;
struct adfs_sb_info *sbi = ADFS_SB(sb);
- struct adfs_discrecord *dr = adfs_map_discrecord(sbi->s_map);
u64 id = huge_encode_dev(sb->s_bdev->bd_dev);
+ adfs_map_statfs(sb, buf);
+
buf->f_type = ADFS_SUPER_MAGIC;
buf->f_namelen = sbi->s_namelen;
buf->f_bsize = sb->s_blocksize;
- buf->f_blocks = adfs_disc_size(dr) >> sb->s_blocksize_bits;
- buf->f_files = sbi->s_ids_per_zone * sbi->s_map_size;
- buf->f_bavail =
- buf->f_bfree = adfs_map_free(sb);
buf->f_ffree = (long)(buf->f_bfree * buf->f_files) / (long)buf->f_blocks;
buf->f_fsid.val[0] = (u32)id;
buf->f_fsid.val[1] = (u32)(id >> 32);