]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
Revert "ceph: use ceph_evict_inode to cleanup inode's resource"
authorSasha Levin <sashal@kernel.org>
Tue, 1 Oct 2019 22:01:07 +0000 (18:01 -0400)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 16 Oct 2019 09:55:38 +0000 (11:55 +0200)
BugLink: https://bugs.launchpad.net/bugs/1847155
This reverts commit 812810399999a673d30f9d04d38659030a28051a.

The backport was incorrect and was causing kernel panics. Revert and
re-apply a correct backport from Jeff Layton.

Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
fs/ceph/inode.c
fs/ceph/super.c
fs/ceph/super.h

index 98351ed5f9c4b425b4affab7635b6dd5379acc6d..23feb753fce92eb10434f8f88989cf813d7519ef 100644 (file)
@@ -524,16 +524,13 @@ static void ceph_i_callback(struct rcu_head *head)
        kmem_cache_free(ceph_inode_cachep, ci);
 }
 
-void ceph_evict_inode(struct inode *inode)
+void ceph_destroy_inode(struct inode *inode)
 {
        struct ceph_inode_info *ci = ceph_inode(inode);
        struct ceph_inode_frag *frag;
        struct rb_node *n;
 
-       dout("evict_inode %p ino %llx.%llx\n", inode, ceph_vinop(inode));
-
-       truncate_inode_pages_final(&inode->i_data);
-       clear_inode(inode);
+       dout("destroy_inode %p ino %llx.%llx\n", inode, ceph_vinop(inode));
 
        ceph_fscache_unregister_inode_cookie(ci);
 
index 1938987e461ba74d3c196a151421bb81be52dd99..2dabb62d13440001f98f50af3d0daa18d91d7902 100644 (file)
@@ -789,9 +789,9 @@ static int ceph_remount(struct super_block *sb, int *flags, char *data)
 
 static const struct super_operations ceph_super_ops = {
        .alloc_inode    = ceph_alloc_inode,
+       .destroy_inode  = ceph_destroy_inode,
        .write_inode    = ceph_write_inode,
        .drop_inode     = ceph_drop_inode,
-       .evict_inode    = ceph_evict_inode,
        .sync_fs        = ceph_sync_fs,
        .put_super      = ceph_put_super,
        .remount_fs     = ceph_remount,
index 5e138df85a23f9eb45329f24d7df26da422db728..347a522c8ae2f116ce312642053e9a87638ea4a1 100644 (file)
@@ -852,7 +852,7 @@ static inline bool __ceph_have_pending_cap_snap(struct ceph_inode_info *ci)
 extern const struct inode_operations ceph_file_iops;
 
 extern struct inode *ceph_alloc_inode(struct super_block *sb);
-extern void ceph_evict_inode(struct inode *inode);
+extern void ceph_destroy_inode(struct inode *inode);
 extern int ceph_drop_inode(struct inode *inode);
 
 extern struct inode *ceph_get_inode(struct super_block *sb,