Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 310481
b: refs/heads/master
c: 203627b
h: refs/heads/master
i:
  310479: 170fd6a
v: v3
  • Loading branch information
Miklos Szeredi committed May 14, 2012
1 parent 9a44c74 commit cc215f2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 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: 45c72cd73c788dd18c8113d4a404d6b4a01decf1
refs/heads/master: 203627bbc90377c509e32450c67c5d957ba2d989
10 changes: 9 additions & 1 deletion trunk/fs/fuse/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -775,6 +775,8 @@ static int fuse_link(struct dentry *entry, struct inode *newdir,
static void fuse_fillattr(struct inode *inode, struct fuse_attr *attr,
struct kstat *stat)
{
unsigned int blkbits;

stat->dev = inode->i_sb->s_dev;
stat->ino = attr->ino;
stat->mode = (inode->i_mode & S_IFMT) | (attr->mode & 07777);
Expand All @@ -790,7 +792,13 @@ static void fuse_fillattr(struct inode *inode, struct fuse_attr *attr,
stat->ctime.tv_nsec = attr->ctimensec;
stat->size = attr->size;
stat->blocks = attr->blocks;
stat->blksize = (1 << inode->i_blkbits);

if (attr->blksize != 0)
blkbits = ilog2(attr->blksize);
else
blkbits = inode->i_sb->s_blocksize_bits;

stat->blksize = 1 << blkbits;
}

static int fuse_do_getattr(struct inode *inode, struct kstat *stat,
Expand Down

0 comments on commit cc215f2

Please sign in to comment.