diff options
-rw-r--r-- | fs/f2fs/super.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 4ccbb860ad06..2852a0b34d64 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c | |||
@@ -852,7 +852,8 @@ static int f2fs_statfs(struct dentry *dentry, struct kstatfs *buf) | |||
852 | buf->f_bavail = user_block_count - valid_user_blocks(sbi); | 852 | buf->f_bavail = user_block_count - valid_user_blocks(sbi); |
853 | 853 | ||
854 | buf->f_files = sbi->total_node_count - F2FS_RESERVED_NODE_NUM; | 854 | buf->f_files = sbi->total_node_count - F2FS_RESERVED_NODE_NUM; |
855 | buf->f_ffree = buf->f_files - valid_inode_count(sbi); | 855 | buf->f_ffree = min(buf->f_files - valid_node_count(sbi), |
856 | buf->f_bavail); | ||
856 | 857 | ||
857 | buf->f_namelen = F2FS_NAME_LEN; | 858 | buf->f_namelen = F2FS_NAME_LEN; |
858 | buf->f_fsid.val[0] = (u32)id; | 859 | buf->f_fsid.val[0] = (u32)id; |