Skip to content

Commit

Permalink
ceph: initialize i_size/i_rbytes on snapdir
Browse files Browse the repository at this point in the history
Signed-off-by: Sage Weil <sage@newdream.net>
  • Loading branch information
Sage Weil committed Nov 11, 2009
1 parent 09b8a7d commit b377ff1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fs/ceph/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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;
}

Expand Down

0 comments on commit b377ff1

Please sign in to comment.