Merge tag 'ceph-for-5.17-rc1' of git://github.com/ceph/ceph-client
[linux-2.6-microblaze.git] / net / ceph / ceph_common.c
index decae43..ecc400a 100644 (file)
@@ -190,33 +190,6 @@ int ceph_compare_options(struct ceph_options *new_opt,
 }
 EXPORT_SYMBOL(ceph_compare_options);
 
-/*
- * kvmalloc() doesn't fall back to the vmalloc allocator unless flags are
- * compatible with (a superset of) GFP_KERNEL.  This is because while the
- * actual pages are allocated with the specified flags, the page table pages
- * are always allocated with GFP_KERNEL.
- *
- * ceph_kvmalloc() may be called with GFP_KERNEL, GFP_NOFS or GFP_NOIO.
- */
-void *ceph_kvmalloc(size_t size, gfp_t flags)
-{
-       void *p;
-
-       if ((flags & (__GFP_IO | __GFP_FS)) == (__GFP_IO | __GFP_FS)) {
-               p = kvmalloc(size, flags);
-       } else if ((flags & (__GFP_IO | __GFP_FS)) == __GFP_IO) {
-               unsigned int nofs_flag = memalloc_nofs_save();
-               p = kvmalloc(size, GFP_KERNEL);
-               memalloc_nofs_restore(nofs_flag);
-       } else {
-               unsigned int noio_flag = memalloc_noio_save();
-               p = kvmalloc(size, GFP_KERNEL);
-               memalloc_noio_restore(noio_flag);
-       }
-
-       return p;
-}
-
 int ceph_parse_fsid(const char *str, struct ceph_fsid *fsid)
 {
        int i = 0;