summaryrefslogtreecommitdiffstats
path: root/fs/ceph/inode.c
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2009-11-12 00:22:37 +0100
committerSage Weil <sage@newdream.net>2009-11-12 00:50:28 +0100
commitb377ff13b31778c19203f3089d14080beb40a692 (patch)
treed872382487128fb0b1f9cfc3e67ac6ffdd9ecd4b /fs/ceph/inode.c
parentceph: exclude snapdir from readdir results (diff)
downloadlinux-b377ff13b31778c19203f3089d14080beb40a692.tar.xz
linux-b377ff13b31778c19203f3089d14080beb40a692.zip
ceph: initialize i_size/i_rbytes on snapdir
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/inode.c')
-rw-r--r--fs/ceph/inode.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
index 036873c42a78..074ee42bd344 100644
--- a/fs/ceph/inode.c
+++ b/fs/ceph/inode.c
@@ -62,6 +62,7 @@ struct inode *ceph_get_snapdir(struct inode *parent)
.snap = CEPH_SNAPDIR,
};
struct inode *inode = ceph_get_inode(parent->i_sb, vino);
+ struct ceph_inode_info *ci = ceph_inode(inode);
BUG_ON(!S_ISDIR(parent->i_mode));
if (IS_ERR(inode))
@@ -71,7 +72,8 @@ struct inode *ceph_get_snapdir(struct inode *parent)
inode->i_gid = parent->i_gid;
inode->i_op = &ceph_dir_iops;
inode->i_fop = &ceph_dir_fops;
- ceph_inode(inode)->i_snap_caps = CEPH_CAP_PIN; /* so we can open */
+ ci->i_snap_caps = CEPH_CAP_PIN; /* so we can open */
+ ci->i_rbytes = 0;
return inode;
}