}
}
-void ll_delete_inode(struct inode *inode)
+void ll_put_inode(struct inode *inode)
{
- int rc;
- struct lustre_id id;
struct ll_sb_info *sbi = ll_i2sbi(inode);
+ struct lustre_id id;
+ int rc;
ENTRY;
-
- ll_inode2id(&id, inode);
- rc = md_delete_object(sbi->ll_lmv_exp, &id);
- if (rc) {
- CERROR("md_delete_object() failed, error %d.\n",
- rc);
+ /*
+ * notifying metadata target that any in memory data assosiated
+ * with object @id should be removed.
+ */
+ if (atomic_read(&inode->i_count) == 1) {
+ ll_inode2id(&id, inode);
+
+ rc = md_put_inode(sbi->ll_lmv_exp, &id);
+ if (rc) {
+ CDEBUG("md_put_inode() failed, error %d\n",
+ rc);
+ }
}
- clear_inode(inode);
EXIT;
}