Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 174356
b: refs/heads/master
c: cae012d
h: refs/heads/master
v: v3
  • Loading branch information
Boaz Harrosh committed Dec 10, 2009
1 parent bcd9261 commit 6b3d1f3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 19fe294f2eaee33574ac1fdcf3cc26880de820ea
refs/heads/master: cae012d8532879544326fff5fa2ae22a6dfe8e23
10 changes: 6 additions & 4 deletions trunk/fs/exofs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -473,9 +473,11 @@ static int exofs_statfs(struct dentry *dentry, struct kstatfs *buf)
goto out;

ret = extract_attr_from_req(or, &attrs[0]);
if (likely(!ret))
if (likely(!ret)) {
capacity = get_unaligned_be64(attrs[0].val_ptr);
else
if (unlikely(!capacity))
capacity = ULLONG_MAX;
} else
EXOFS_DBGMSG("exofs_statfs: get capacity failed.\n");

ret = extract_attr_from_req(or, &attrs[1]);
Expand All @@ -487,8 +489,8 @@ static int exofs_statfs(struct dentry *dentry, struct kstatfs *buf)
/* fill in the stats buffer */
buf->f_type = EXOFS_SUPER_MAGIC;
buf->f_bsize = EXOFS_BLKSIZE;
buf->f_blocks = (capacity >> EXOFS_BLKSHIFT);
buf->f_bfree = ((capacity - used) >> EXOFS_BLKSHIFT);
buf->f_blocks = capacity >> 9;
buf->f_bfree = (capacity - used) >> 9;
buf->f_bavail = buf->f_bfree;
buf->f_files = sbi->s_numfiles;
buf->f_ffree = EXOFS_MAX_ID - sbi->s_numfiles;
Expand Down

0 comments on commit 6b3d1f3

Please sign in to comment.