Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 251303
b: refs/heads/master
c: ae59808
h: refs/heads/master
i:
  251301: a7dd0b0
  251299: e233b19
  251295: 98a85a2
v: v3
  • Loading branch information
Sage Weil committed May 19, 2011
1 parent 9470915 commit 88b5021
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 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: e8f54ce169125a2e59330fac25ad3c9ac0ce22a5
refs/heads/master: ae598083015e22d1802617c18d3408971b1bddc0
5 changes: 3 additions & 2 deletions trunk/fs/ceph/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -1066,16 +1066,17 @@ static ssize_t ceph_read_dir(struct file *file, char __user *buf, size_t size,
struct inode *inode = file->f_dentry->d_inode;
struct ceph_inode_info *ci = ceph_inode(inode);
int left;
const int bufsize = 1024;

if (!ceph_test_mount_opt(ceph_sb_to_client(inode->i_sb), DIRSTAT))
return -EISDIR;

if (!cf->dir_info) {
cf->dir_info = kmalloc(1024, GFP_NOFS);
cf->dir_info = kmalloc(bufsize, GFP_NOFS);
if (!cf->dir_info)
return -ENOMEM;
cf->dir_info_len =
sprintf(cf->dir_info,
snprintf(cf->dir_info, bufsize,
"entries: %20lld\n"
" files: %20lld\n"
" subdirs: %20lld\n"
Expand Down

0 comments on commit 88b5021

Please sign in to comment.