diff options
author | Tejun Heo <tj@kernel.org> | 2011-02-21 03:43:56 -0500 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2011-02-21 03:43:56 -0500 |
commit | 43d133c18b44e7d82d82ef0dcc2bddd55d5dfe81 (patch) | |
tree | 8de75c837b55874cc8a81a29bdedbc62668d4481 /fs/ceph/inode.c | |
parent | 4149efb22da66e326fc48baf80d628834509f7f0 (diff) | |
parent | 6f576d57f1fa0d6026b495d8746d56d949989161 (diff) |
Merge branch 'master' into for-2.6.39
Diffstat (limited to 'fs/ceph/inode.c')
-rw-r--r-- | fs/ceph/inode.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index e835eff551e3..5625463aa479 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c | |||
@@ -710,10 +710,6 @@ static int fill_inode(struct inode *inode, | |||
710 | ci->i_ceph_flags |= CEPH_I_COMPLETE; | 710 | ci->i_ceph_flags |= CEPH_I_COMPLETE; |
711 | ci->i_max_offset = 2; | 711 | ci->i_max_offset = 2; |
712 | } | 712 | } |
713 | |||
714 | /* it may be better to set st_size in getattr instead? */ | ||
715 | if (ceph_test_mount_opt(ceph_sb_to_client(inode->i_sb), RBYTES)) | ||
716 | inode->i_size = ci->i_rbytes; | ||
717 | break; | 713 | break; |
718 | default: | 714 | default: |
719 | pr_err("fill_inode %llx.%llx BAD mode 0%o\n", | 715 | pr_err("fill_inode %llx.%llx BAD mode 0%o\n", |
@@ -1819,7 +1815,11 @@ int ceph_getattr(struct vfsmount *mnt, struct dentry *dentry, | |||
1819 | else | 1815 | else |
1820 | stat->dev = 0; | 1816 | stat->dev = 0; |
1821 | if (S_ISDIR(inode->i_mode)) { | 1817 | if (S_ISDIR(inode->i_mode)) { |
1822 | stat->size = ci->i_rbytes; | 1818 | if (ceph_test_mount_opt(ceph_sb_to_client(inode->i_sb), |
1819 | RBYTES)) | ||
1820 | stat->size = ci->i_rbytes; | ||
1821 | else | ||
1822 | stat->size = ci->i_files + ci->i_subdirs; | ||
1823 | stat->blocks = 0; | 1823 | stat->blocks = 0; |
1824 | stat->blksize = 65536; | 1824 | stat->blksize = 65536; |
1825 | } | 1825 | } |