diff options
author | Sage Weil <sage@newdream.net> | 2009-11-11 18:22:37 -0500 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2009-11-11 18:50:28 -0500 |
commit | b377ff13b31778c19203f3089d14080beb40a692 (patch) | |
tree | d872382487128fb0b1f9cfc3e67ac6ffdd9ecd4b /fs | |
parent | 09b8a7d2af83ae96dc052f9708e50140d06a9b6c (diff) |
ceph: initialize i_size/i_rbytes on snapdir
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ceph/inode.c | 4 |
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) | |||
62 | .snap = CEPH_SNAPDIR, | 62 | .snap = CEPH_SNAPDIR, |
63 | }; | 63 | }; |
64 | struct inode *inode = ceph_get_inode(parent->i_sb, vino); | 64 | struct inode *inode = ceph_get_inode(parent->i_sb, vino); |
65 | struct ceph_inode_info *ci = ceph_inode(inode); | ||
65 | 66 | ||
66 | BUG_ON(!S_ISDIR(parent->i_mode)); | 67 | BUG_ON(!S_ISDIR(parent->i_mode)); |
67 | if (IS_ERR(inode)) | 68 | if (IS_ERR(inode)) |
@@ -71,7 +72,8 @@ struct inode *ceph_get_snapdir(struct inode *parent) | |||
71 | inode->i_gid = parent->i_gid; | 72 | inode->i_gid = parent->i_gid; |
72 | inode->i_op = &ceph_dir_iops; | 73 | inode->i_op = &ceph_dir_iops; |
73 | inode->i_fop = &ceph_dir_fops; | 74 | inode->i_fop = &ceph_dir_fops; |
74 | ceph_inode(inode)->i_snap_caps = CEPH_CAP_PIN; /* so we can open */ | 75 | ci->i_snap_caps = CEPH_CAP_PIN; /* so we can open */ |
76 | ci->i_rbytes = 0; | ||
75 | return inode; | 77 | return inode; |
76 | } | 78 | } |
77 | 79 | ||