Whamcloud - gitweb
LU-12275 sec: ioctls to handle encryption policies
[fs/lustre-release.git] / lustre / llite / super25.c
index befd246..5c5b9db 100644 (file)
@@ -61,6 +61,7 @@ static void ll_inode_destroy_callback(struct rcu_head *head)
 {
        struct inode *inode = container_of(head, struct inode, i_rcu);
        struct ll_inode_info *ptr = ll_i2info(inode);
+       llcrypt_free_inode(inode);
        OBD_SLAB_FREE_PTR(ptr, ll_inode_cachep);
 }
 
@@ -69,17 +70,28 @@ static void ll_destroy_inode(struct inode *inode)
        call_rcu(&inode->i_rcu, ll_inode_destroy_callback);
 }
 
+static int ll_drop_inode(struct inode *inode)
+{
+       int drop = generic_drop_inode(inode);
+
+       if (!drop)
+               drop = llcrypt_drop_inode(inode);
+
+       return drop;
+}
+
 /* exported operations */
 struct super_operations lustre_super_operations =
 {
-        .alloc_inode   = ll_alloc_inode,
-        .destroy_inode = ll_destroy_inode,
-        .evict_inode   = ll_delete_inode,
-        .put_super     = ll_put_super,
-        .statfs        = ll_statfs,
-        .umount_begin  = ll_umount_begin,
-        .remount_fs    = ll_remount_fs,
-        .show_options  = ll_show_options,
+       .alloc_inode   = ll_alloc_inode,
+       .destroy_inode = ll_destroy_inode,
+       .drop_inode    = ll_drop_inode,
+       .evict_inode   = ll_delete_inode,
+       .put_super     = ll_put_super,
+       .statfs        = ll_statfs,
+       .umount_begin  = ll_umount_begin,
+       .remount_fs    = ll_remount_fs,
+       .show_options  = ll_show_options,
 };
 
 static int __init lustre_init(void)