OpenVZ Forum


Home » Mailing lists » Devel » [PATCH] fix of sim_statfs
[PATCH] fix of sim_statfs [message #618] Wed, 28 December 2005 12:50
dim is currently offline  dim
Messages: 344
Registered: August 2005
Senior Member
Patch from Dmitry (dim@), issue found by BJMG:
- fixed statfs over simfs with enabled LBD

--
Thanks,
Dmitry.

--- ./fs/simfs.c.statfs 2005-12-13 16:15:01.000000000 +0300
+++ ./fs/simfs.c 2005-12-28 15:42:37.000000000 +0300
@@ -122,6 +122,7 @@ static int sim_statfs(struct super_block
{
int err;
struct super_block *lsb;
+ struct kstatfs statbuf;

err = 0;
if (sb->s_op != &sim_super_ops)
@@ -131,11 +132,17 @@ static int sim_statfs(struct super_block

err = -ENOSYS;
if (lsb && lsb->s_op && lsb->s_op->statfs)
- err = lsb->s_op->statfs(lsb, (struct kstatfs *)buf);
+ err = lsb->s_op->statfs(lsb, &statbuf);
if (err)
goto out;

- quota_get_stat(sb, (struct kstatfs *)buf);
+ quota_get_stat(sb, &statbuf);
+
+ buf->f_files = statbuf.f_files;
+ buf->f_ffree = statbuf.f_ffree;
+ buf->f_blocks = statbuf.f_blocks;
+ buf->f_bfree = statbuf.f_bfree;
+ buf->f_bavail = statbuf.f_bavail;
out:
return err;
}
Previous Topic: [PATCH] Fix of vm_rss calculations in vma_merge
Next Topic: [KERNEL COMMIT]: diff-simfs-statfs-20051228
Goto Forum:
  


Current Time: Wed Aug 27 15:13:09 GMT 2025

Total time taken to generate the page: 0.15356 seconds