- if(!ind)
- RETURN(-EINVAL);
- if (!SMFS_DO_INODE_COWED(inode)) {
- /*insert the inode to cowed inode*/
- SMFS_SET_INODE_COWED(inode);
- link_cowed_inode(inode);
+ if(ind && IS_ERR(ind)) {
+ CERROR("Create ind inode %lu index %d gen %d del %d\n rc%d\n",
+ inode->i_ino, snap.sn_index, snap.sn_gen, del,
+ PTR_ERR(ind));
+ RETURN(PTR_ERR(ind));
+ }
+ if (ind) {
+ if (!SMFS_DO_INODE_COWED(inode)) {
+ /*insert the inode to cowed inode*/
+ SMFS_SET_INODE_COWED(inode);
+ link_cowed_inode(inode);
+ }
+
+ I2SMI(ind)->sm_sninfo.sn_flags = 0;
+ I2SMI(ind)->sm_sninfo.sn_gen = snap.sn_gen;
+
+ iput(ind);