imamnurby/smpl_train_seed8 huggingface dataset:
--- initial
+++ final
@@ -1,77 +1,77 @@
 static int ll_dir_filler(void *_hash, struct page *page0) {
   struct inode *inode = page0->mapping->host;
   int hash64 = ll_i2sbi(inode)->ll_flags & LL_SBI_64BIT_HASH;
   struct obd_export *exp = ll_i2sbi(inode)->ll_md_exp;
   struct ptlrpc_request *request;
   struct mdt_body *body;
   struct md_op_data *op_data;
   __u64 hash = *((__u64 *)_hash);
   struct page **page_pool;
   struct page *page;
   struct lu_dirpage *dp;
   int max_pages = ll_i2sbi(inode)->ll_md_brw_size >> PAGE_CACHE_SHIFT;
   int nrdpgs = 0; /* number of pages read actually */
   int npages;
   int i;
   int rc;
   CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p) hash %llu\n", inode->i_ino, inode->i_generation, inode, hash);
   LASSERT(max_pages > 0 && max_pages <= MD_MAX_BRW_PAGES);
-  OBD_ALLOC(page_pool, sizeof(page) * max_pages);
-  if (page_pool != NULL) {
+  page_pool = kzalloc(sizeof(page) * max_pages, GFP_NOFS);
+  if (page_pool) {
     page_pool[0] = page0;
   } else {
     page_pool = &page0;
     max_pages = 1;
   }
   for (npages = 1; npages < max_pages; npages++) {
     page = page_cache_alloc_cold(inode->i_mapping);
     if (!page) break;
     page_pool[npages] = page;
   }
   op_data = ll_prep_md_op_data(NULL, inode, NULL, NULL, 0, 0, LUSTRE_OPC_ANY, NULL);
   op_data->op_npages = npages;
   op_data->op_offset = hash;
   rc = md_readpage(exp, op_data, page_pool, &request);
   ll_finish_md_op_data(op_data);
   if (rc == 0) {
     body = req_capsule_server_get(&request->rq_pill, &RMF_MDT_BODY);
     /* Checked by mdc_readpage() */
     LASSERT(body != NULL);
     if (body->valid & OBD_MD_FLSIZE) cl_isize_write(inode, body->size);
     nrdpgs = (request->rq_bulk->bd_nob_transferred + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
     SetPageUptodate(page0);
   }
   unlock_page(page0);
   ptlrpc_req_finished(request);
   CDEBUG(D_VFSTRACE, "read %d/%d pages\n", nrdpgs, npages);
   ll_pagevec_init(&lru_pvec, 0);
   for (i = 1; i < npages; i++) {
     unsigned long offset;
     int ret;
     page = page_pool[i];
     if (rc < 0 || i >= nrdpgs) {
       page_cache_release(page);
       continue;
     }
     SetPageUptodate(page);
     dp = kmap(page);
     hash = le64_to_cpu(dp->ldp_hash_start);
     kunmap(page);
     offset = hash_x_index(hash, hash64);
     prefetchw(&page->flags);
     ret = add_to_page_cache_lru(page, inode->i_mapping, offset, GFP_KERNEL);
     if (ret == 0) {
       unlock_page(page);
       if (ll_pagevec_add(&lru_pvec, page) == 0) ll_pagevec_lru_add_file(&lru_pvec);
     } else {
       CDEBUG(D_VFSTRACE,
              "page %lu add to page cache failed:"
              " %d\n",
              offset, ret);
     }
     page_cache_release(page);
   }
   ll_pagevec_lru_add_file(&lru_pvec);
   if (page_pool != &page0) OBD_FREE(page_pool, sizeof(struct page *) * max_pages);
   return rc;
 }<sep>@@
expression e,sz;
statement S1,S2;
@@

-	OBD_ALLOC(e,sz);
+	e = kzalloc(sz, GFP_NOFS);
	if (likely(
-	    e != NULL
+	    e
	   ))
	S1 else S2
--- initial
+++ final
@@ -1,42 +1,42 @@
 struct md_op_data *ll_prep_md_op_data(struct md_op_data *op_data, struct inode *i1, struct inode *i2, const char *name, int namelen, int mode, __u32 opc, void *data) {
   LASSERT(i1 != NULL);
   if (namelen > ll_i2sbi(i1)->ll_namelen) return ERR_PTR(-ENAMETOOLONG);
-  if (op_data == NULL) OBD_ALLOC_PTR(op_data);
+  if (op_data == NULL) op_data = kzalloc(sizeof(*op_data), GFP_NOFS);
   if (op_data == NULL) return ERR_PTR(-ENOMEM);
   ll_i2gids(op_data->op_suppgids, i1, i2);
   op_data->op_fid1 = *ll_inode2fid(i1);
   op_data->op_capa1 = ll_mdscapa_get(i1);
   if (i2) {
     op_data->op_fid2 = *ll_inode2fid(i2);
     op_data->op_capa2 = ll_mdscapa_get(i2);
   } else {
     fid_zero(&op_data->op_fid2);
     op_data->op_capa2 = NULL;
   }
   op_data->op_name = name;
   op_data->op_namelen = namelen;
   op_data->op_mode = mode;
   op_data->op_mod_time = get_seconds();
   op_data->op_fsuid = from_kuid(&init_user_ns, current_fsuid());
   op_data->op_fsgid = from_kgid(&init_user_ns, current_fsgid());
   op_data->op_cap = cfs_curproc_cap_pack();
   op_data->op_bias = 0;
   op_data->op_cli_flags = 0;
   if ((opc == LUSTRE_OPC_CREATE) && (name != NULL) && filename_is_volatile(name, namelen, NULL)) op_data->op_bias |= MDS_CREATE_VOLATILE;
   op_data->op_opc = opc;
   op_data->op_mds = 0;
   op_data->op_data = data;
   /* If the file is being opened after mknod() (normally due to NFS)
    * try to use the default stripe data from parent directory for
    * allocating OST objects.  Try to pass the parent FID to MDS. */
   if (opc == LUSTRE_OPC_CREATE && i1 == i2 && S_ISREG(i2->i_mode) && !ll_i2info(i2)->lli_has_smd) {
     struct ll_inode_info *lli = ll_i2info(i2);
     spin_lock(&lli->lli_lock);
     if (likely(!lli->lli_has_smd && !fid_is_zero(&lli->lli_pfid))) op_data->op_fid1 = lli->lli_pfid;
     spin_unlock(&lli->lli_lock);
     /** We ignore parent's capability temporary. */
   }
   /* When called by ll_setattr_raw, file is i1. */
   if (LLIF_DATA_MODIFIED & ll_i2info(i1)->lli_flags) op_data->op_bias |= MDS_DATA_MODIFIED;
   return op_data;
 }<sep>@@
expression e;
@@

-	OBD_ALLOC_PTR(e);
+	e = kzalloc(sizeof(*e), GFP_NOFS);
--- initial
+++ final
@@ -1,29 +1,29 @@
 void ll_umount_begin(struct super_block *sb) {
   struct ll_sb_info *sbi = ll_s2sbi(sb);
   struct obd_device *obd;
   struct obd_ioctl_data *ioc_data;
   CDEBUG(D_VFSTRACE, "VFS Op: superblock %p count %d active %d\n", sb, sb->s_count, atomic_read(&sb->s_active));
   obd = class_exp2obd(sbi->ll_md_exp);
   if (obd == NULL) {
     CERROR("Invalid MDC connection handle %#llx\n", sbi->ll_md_exp->exp_handle.h_cookie);
     return;
   }
   obd->obd_force = 1;
   obd = class_exp2obd(sbi->ll_dt_exp);
   if (obd == NULL) {
     CERROR("Invalid LOV connection handle %#llx\n", sbi->ll_dt_exp->exp_handle.h_cookie);
     return;
   }
   obd->obd_force = 1;
-  OBD_ALLOC_PTR(ioc_data);
+  ioc_data = kzalloc(sizeof(*ioc_data), GFP_NOFS);
   if (ioc_data) {
     obd_iocontrol(IOC_OSC_SET_ACTIVE, sbi->ll_md_exp, sizeof(*ioc_data), ioc_data, NULL);
     obd_iocontrol(IOC_OSC_SET_ACTIVE, sbi->ll_dt_exp, sizeof(*ioc_data), ioc_data, NULL);
     OBD_FREE_PTR(ioc_data);
   }
   /* Really, we'd like to wait until there are no requests outstanding,
    * and then continue.  For now, we just invalidate the requests,
    * schedule() and sleep one second if needed, and hope.
    */
   schedule();
 }<sep>@@
expression e;
statement S1,S2;
@@

-	OBD_ALLOC_PTR(e);
+	e = kzalloc(sizeof(*e), GFP_NOFS);
 	if (likely(
-	    e != NULL
+	    e
	   ))
	S1 else S2
--- initial
+++ final
@@ -1,63 +1,63 @@
 static int __init lloop_init(void) {
   int i;
   unsigned int cmdlist[] = {
       LL_IOC_LLOOP_ATTACH,
       LL_IOC_LLOOP_DETACH_BYDEV,
   };
   if (max_loop < 1 || max_loop > 256) {
     max_loop = MAX_LOOP_DEFAULT;
     CWARN("lloop: invalid max_loop (must be between"
           " 1 and 256), using default (%u)\n",
           max_loop);
   }
   lloop_major = register_blkdev(0, "lloop");
   if (lloop_major < 0) return -EIO;
   CDEBUG(D_CONFIG, "registered lloop major %d with %u minors\n", lloop_major, max_loop);
   ll_iocontrol_magic = ll_iocontrol_register(lloop_ioctl, 2, cmdlist);
   if (ll_iocontrol_magic == NULL) goto out_mem1;
-  OBD_ALLOC_WAIT(loop_dev, max_loop * sizeof(*loop_dev));
+  loop_dev = kzalloc(max_loop * sizeof(*loop_dev), GFP_KERNEL);
   if (!loop_dev) goto out_mem1;
-  OBD_ALLOC_WAIT(disks, max_loop * sizeof(*disks));
+  disks = kzalloc(max_loop * sizeof(*disks), GFP_KERNEL);
   if (!disks) goto out_mem2;
   for (i = 0; i < max_loop; i++) {
     disks[i] = alloc_disk(1);
     if (!disks[i]) goto out_mem3;
   }
   mutex_init(&lloop_mutex);
   for (i = 0; i < max_loop; i++) {
     struct lloop_device *lo = &loop_dev[i];
     struct gendisk *disk = disks[i];
     lo->lo_queue = blk_alloc_queue(GFP_KERNEL);
     if (!lo->lo_queue) goto out_mem4;
     mutex_init(&lo->lo_ctl_mutex);
     sema_init(&lo->lo_sem, 0);
     init_waitqueue_head(&lo->lo_bh_wait);
     lo->lo_number = i;
     spin_lock_init(&lo->lo_lock);
     disk->major = lloop_major;
     disk->first_minor = i;
     disk->fops = &lo_fops;
     sprintf(disk->disk_name, "lloop%d", i);
     disk->private_data = lo;
     disk->queue = lo->lo_queue;
   }
   /* We cannot fail after we call this, so another loop!*/
   for (i = 0; i < max_loop; i++)
     add_disk(disks[i]);
   return 0;
 out_mem4:
   while (i--)
     blk_cleanup_queue(loop_dev[i].lo_queue);
   i = max_loop;
 out_mem3:
   while (i--)
     put_disk(disks[i]);
   OBD_FREE(disks, max_loop * sizeof(*disks));
 out_mem2:
   OBD_FREE(loop_dev, max_loop * sizeof(*loop_dev));
 out_mem1:
   unregister_blkdev(lloop_major, "lloop");
   ll_iocontrol_unregister(ll_iocontrol_magic);
   CERROR("lloop: ran out of memory\n");
   return -ENOMEM;
 }<sep>@@
expression e,sz;
statement S1,S2;
@@

-	OBD_ALLOC_WAIT(e,sz);
+	e = kzalloc(sz, GFP_KERNEL);
	if (unlikely(
-	    e == NULL
+	    !e
	   ))
	S1 else S2
--- initial
+++ final
@@ -1,57 +1,57 @@
 static int ll_readlink_internal(struct inode *inode, struct ptlrpc_request **request, char **symname) {
   struct ll_inode_info *lli = ll_i2info(inode);
   struct ll_sb_info *sbi = ll_i2sbi(inode);
   int rc, symlen = i_size_read(inode) + 1;
   struct mdt_body *body;
   struct md_op_data *op_data;
   *request = NULL;
   if (lli->lli_symlink_name) {
     int print_limit = min_t(int, PAGE_SIZE - 128, symlen);
     *symname = lli->lli_symlink_name;
     /* If the total CDEBUG() size is larger than a page, it
      * will print a warning to the console, avoid this by
      * printing just the last part of the symlink. */
     CDEBUG(D_INODE, "using cached symlink %s%.*s, len = %d\n", print_limit < symlen ? "..." : "", print_limit, (*symname) + symlen - print_limit, symlen);
     return 0;
   }
   op_data = ll_prep_md_op_data(NULL, inode, NULL, NULL, 0, symlen, LUSTRE_OPC_ANY, NULL);
   if (IS_ERR(op_data)) return PTR_ERR(op_data);
   op_data->op_valid = OBD_MD_LINKNAME;
   rc = md_getattr(sbi->ll_md_exp, op_data, request);
   ll_finish_md_op_data(op_data);
   if (rc) {
     if (rc != -ENOENT) CERROR("inode %lu: rc = %d\n", inode->i_ino, rc);
     goto failed;
   }
   body = req_capsule_server_get(&(*request)->rq_pill, &RMF_MDT_BODY);
   LASSERT(body != NULL);
   if ((body->valid & OBD_MD_LINKNAME) == 0) {
     CERROR("OBD_MD_LINKNAME not set on reply\n");
     rc = -EPROTO;
     goto failed;
   }
   LASSERT(symlen != 0);
   if (body->eadatasize != symlen) {
     CERROR("inode %lu: symlink length %d not expected %d\n", inode->i_ino, body->eadatasize - 1, symlen - 1);
     rc = -EPROTO;
     goto failed;
   }
   *symname = req_capsule_server_get(&(*request)->rq_pill, &RMF_MDT_MD);
   if (*symname == NULL || strnlen(*symname, symlen) != symlen - 1) {
     /* not full/NULL terminated */
     CERROR("inode %lu: symlink not NULL terminated string"
            "of length %d\n",
            inode->i_ino, symlen - 1);
     rc = -EPROTO;
     goto failed;
   }
-  OBD_ALLOC(lli->lli_symlink_name, symlen);
+  lli->lli_symlink_name = kzalloc(symlen, GFP_NOFS);
   /* do not return an error if we cannot cache the symlink locally */
   if (lli->lli_symlink_name) {
     memcpy(lli->lli_symlink_name, *symname, symlen);
     *symname = lli->lli_symlink_name;
   }
   return 0;
 failed:
   return rc;
 }<sep>@@
expression e,sz;
statement S1,S2;
@@

-	OBD_ALLOC(e,sz);
+	e = kzalloc(sz, GFP_NOFS);
	if (likely(
-	    e != NULL
+	    e
	   ))
	S1 else S2
--- initial
+++ final
@@ -1,4 +1,4 @@
 static int __net_init if6_proc_net_init(struct net *net) {
-  if (!proc_net_fops_create(net, "if_inet6", S_IRUGO, &if6_fops)) return -ENOMEM;
+  if (!proc_create("if_inet6", S_IRUGO, net->proc_net, &if6_fops)) return -ENOMEM;
   return 0;
 }<sep>@@
expression net,e1,e2,e3;
@@

- proc_net_fops_create(net, e1, e2, e3)
+ proc_create(e1, e2, net->proc_net, e3)
--- initial
+++ final
@@ -1,12 +1,12 @@
 static int __init ax25_init(void) {
   int rc = proto_register(&ax25_proto, 0);
   if (rc != 0) goto out;
   sock_register(&ax25_family_ops);
   dev_add_pack(&ax25_packet_type);
   register_netdevice_notifier(&ax25_dev_notifier);
-  proc_net_fops_create(&init_net, "ax25_route", S_IRUGO, &ax25_route_fops);
-  proc_net_fops_create(&init_net, "ax25", S_IRUGO, &ax25_info_fops);
-  proc_net_fops_create(&init_net, "ax25_calls", S_IRUGO, &ax25_uid_fops);
+  proc_create("ax25_route", S_IRUGO, init_net.proc_net, &ax25_route_fops);
+  proc_create("ax25", S_IRUGO, init_net.proc_net, &ax25_info_fops);
+  proc_create("ax25_calls", S_IRUGO, init_net.proc_net, &ax25_uid_fops);
 out:
   return rc;
 }<sep>@@
expression net,e1,e2,e3;
@@

- proc_net_fops_create(&net, e1, e2, e3)
+ proc_create(e1, e2, net.proc_net, e3)
--- initial
+++ final
@@ -1,17 +1,17 @@
 static int __init decnet_init(void) {
   int rc;
   printk(banner);
   rc = proto_register(&dn_proto, 1);
   if (rc != 0) goto out;
   dn_neigh_init();
   dn_dev_init();
   dn_route_init();
   dn_fib_init();
   sock_register(&dn_family_ops);
   dev_add_pack(&dn_dix_packet_type);
   register_netdevice_notifier(&dn_dev_notifier);
-  proc_net_fops_create(&init_net, "decnet", S_IRUGO, &dn_socket_seq_fops);
+  proc_create("decnet", S_IRUGO, init_net.proc_net, &dn_socket_seq_fops);
   dn_register_sysctl();
 out:
   return rc;
 }<sep>@@
expression net,e1,e2,e3;
@@

- proc_net_fops_create(&net, e1, e2, e3)
+ proc_create(e1, e2, net.proc_net, e3)
--- initial
+++ final
@@ -1,6 +1,6 @@
 static int __net_init netlink_net_init(struct net *net) {
 #ifdef CONFIG_PROC_FS
-  if (!proc_net_fops_create(net, "netlink", 0, &netlink_seq_fops)) return -ENOMEM;
+  if (!proc_create("netlink", 0, net->proc_net, &netlink_seq_fops)) return -ENOMEM;
 #endif
   return 0;
 }<sep>@@
expression net,e1,e2,e3;
@@

- proc_net_fops_create(net, e1, e2, e3)
+ proc_create(e1, e2, net->proc_net, e3)
--- initial
+++ final
@@ -1,57 +1,57 @@
 static int __init nr_proto_init(void) {
   int i;
   int rc = proto_register(&nr_proto, 0);
   if (rc != 0) goto out;
   if (nr_ndevs > 0x7fffffff / sizeof(struct net_device *)) {
     printk(KERN_ERR "NET/ROM: nr_proto_init - nr_ndevs parameter to large\n");
     return -1;
   }
   dev_nr = kzalloc(nr_ndevs * sizeof(struct net_device *), GFP_KERNEL);
   if (dev_nr == NULL) {
     printk(KERN_ERR "NET/ROM: nr_proto_init - unable to allocate device array\n");
     return -1;
   }
   for (i = 0; i < nr_ndevs; i++) {
     char name[IFNAMSIZ];
     struct net_device *dev;
     sprintf(name, "nr%d", i);
     dev = alloc_netdev(0, name, nr_setup);
     if (!dev) {
       printk(KERN_ERR "NET/ROM: nr_proto_init - unable to allocate device structure\n");
       goto fail;
     }
     dev->base_addr = i;
     if (register_netdev(dev)) {
       printk(KERN_ERR "NET/ROM: nr_proto_init - unable to register network device\n");
       free_netdev(dev);
       goto fail;
     }
     nr_set_lockdep_key(dev);
     dev_nr[i] = dev;
   }
   if (sock_register(&nr_family_ops)) {
     printk(KERN_ERR "NET/ROM: nr_proto_init - unable to register socket family\n");
     goto fail;
   }
   register_netdevice_notifier(&nr_dev_notifier);
   ax25_register_pid(&nr_pid);
   ax25_linkfail_register(&nr_linkfail_notifier);
 #ifdef CONFIG_SYSCTL
   nr_register_sysctl();
 #endif
   nr_loopback_init();
-  proc_net_fops_create(&init_net, "nr", S_IRUGO, &nr_info_fops);
-  proc_net_fops_create(&init_net, "nr_neigh", S_IRUGO, &nr_neigh_fops);
-  proc_net_fops_create(&init_net, "nr_nodes", S_IRUGO, &nr_nodes_fops);
+  proc_create("nr", S_IRUGO, init_net.proc_net, &nr_info_fops);
+  proc_create("nr_neigh", S_IRUGO, init_net.proc_net, &nr_neigh_fops);
+  proc_create("nr_nodes", S_IRUGO, init_net.proc_net, &nr_nodes_fops);
 out:
   return rc;
 fail:
   while (--i >= 0) {
     unregister_netdev(dev_nr[i]);
     free_netdev(dev_nr[i]);
   }
   kfree(dev_nr);
   proto_unregister(&nr_proto);
   rc = -1;
   goto out;
 }<sep>@@
expression net,e1,e2,e3;
@@

- proc_net_fops_create(&net, e1, e2, e3)
+ proc_create(e1, e2, net.proc_net, e3)
--- initial
+++ final
@@ -1,6 +1,6 @@
 static int __net_init packet_net_init(struct net *net) {
   mutex_init(&net->packet.sklist_lock);
   INIT_HLIST_HEAD(&net->packet.sklist);
-  if (!proc_net_fops_create(net, "packet", 0, &packet_seq_fops)) return -ENOMEM;
+  if (!proc_create("packet", 0, net->proc_net, &packet_seq_fops)) return -ENOMEM;
   return 0;
 }<sep>@@
expression net,e1,e2,e3;
@@

- proc_net_fops_create(net, e1, e2, e3)
+ proc_create(e1, e2, net->proc_net, e3)
--- initial
+++ final
@@ -1,61 +1,61 @@
 static int __init rose_proto_init(void) {
   int i;
   int rc;
   if (rose_ndevs > 0x7FFFFFFF / sizeof(struct net_device *)) {
     printk(KERN_ERR "ROSE: rose_proto_init - rose_ndevs parameter to large\n");
     rc = -EINVAL;
     goto out;
   }
   rc = proto_register(&rose_proto, 0);
   if (rc != 0) goto out;
   rose_callsign = null_ax25_address;
   dev_rose = kzalloc(rose_ndevs * sizeof(struct net_device *), GFP_KERNEL);
   if (dev_rose == NULL) {
     printk(KERN_ERR "ROSE: rose_proto_init - unable to allocate device structure\n");
     rc = -ENOMEM;
     goto out_proto_unregister;
   }
   for (i = 0; i < rose_ndevs; i++) {
     struct net_device *dev;
     char name[IFNAMSIZ];
     sprintf(name, "rose%d", i);
     dev = alloc_netdev(0, name, rose_setup);
     if (!dev) {
       printk(KERN_ERR "ROSE: rose_proto_init - unable to allocate memory\n");
       rc = -ENOMEM;
       goto fail;
     }
     rc = register_netdev(dev);
     if (rc) {
       printk(KERN_ERR "ROSE: netdevice registration failed\n");
       free_netdev(dev);
       goto fail;
     }
     rose_set_lockdep_key(dev);
     dev_rose[i] = dev;
   }
   sock_register(&rose_family_ops);
   register_netdevice_notifier(&rose_dev_notifier);
   ax25_register_pid(&rose_pid);
   ax25_linkfail_register(&rose_linkfail_notifier);
 #ifdef CONFIG_SYSCTL
   rose_register_sysctl();
 #endif
   rose_loopback_init();
   rose_add_loopback_neigh();
-  proc_net_fops_create(&init_net, "rose", S_IRUGO, &rose_info_fops);
-  proc_net_fops_create(&init_net, "rose_neigh", S_IRUGO, &rose_neigh_fops);
-  proc_net_fops_create(&init_net, "rose_nodes", S_IRUGO, &rose_nodes_fops);
-  proc_net_fops_create(&init_net, "rose_routes", S_IRUGO, &rose_routes_fops);
+  proc_create("rose", S_IRUGO, init_net.proc_net, &rose_info_fops);
+  proc_create("rose_neigh", S_IRUGO, init_net.proc_net, &rose_neigh_fops);
+  proc_create("rose_nodes", S_IRUGO, init_net.proc_net, &rose_nodes_fops);
+  proc_create("rose_routes", S_IRUGO, init_net.proc_net, &rose_routes_fops);
 out:
   return rc;
 fail:
   while (--i >= 0) {
     unregister_netdev(dev_rose[i]);
     free_netdev(dev_rose[i]);
   }
   kfree(dev_rose);
 out_proto_unregister:
   proto_unregister(&rose_proto);
   goto out;
 }<sep>@@
expression net,e1,e2,e3;
@@

- proc_net_fops_create(&net, e1, e2, e3)
+ proc_create(e1, e2, net.proc_net, e3)
--- initial
+++ final
@@ -1,53 +1,53 @@
 static int __init af_rxrpc_init(void) {
   int ret = -1;
   BUILD_BUG_ON(sizeof(struct rxrpc_skb_priv) > FIELD_SIZEOF(struct sk_buff, cb));
   rxrpc_epoch = htonl(get_seconds());
   ret = -ENOMEM;
   rxrpc_call_jar = kmem_cache_create("rxrpc_call_jar", sizeof(struct rxrpc_call), 0, SLAB_HWCACHE_ALIGN, NULL);
   if (!rxrpc_call_jar) {
     printk(KERN_NOTICE "RxRPC: Failed to allocate call jar\n");
     goto error_call_jar;
   }
   rxrpc_workqueue = alloc_workqueue("krxrpcd", 0, 1);
   if (!rxrpc_workqueue) {
     printk(KERN_NOTICE "RxRPC: Failed to allocate work queue\n");
     goto error_work_queue;
   }
   ret = proto_register(&rxrpc_proto, 1);
   if (ret < 0) {
     printk(KERN_CRIT "RxRPC: Cannot register protocol\n");
     goto error_proto;
   }
   ret = sock_register(&rxrpc_family_ops);
   if (ret < 0) {
     printk(KERN_CRIT "RxRPC: Cannot register socket family\n");
     goto error_sock;
   }
   ret = register_key_type(&key_type_rxrpc);
   if (ret < 0) {
     printk(KERN_CRIT "RxRPC: Cannot register client key type\n");
     goto error_key_type;
   }
   ret = register_key_type(&key_type_rxrpc_s);
   if (ret < 0) {
     printk(KERN_CRIT "RxRPC: Cannot register server key type\n");
     goto error_key_type_s;
   }
 #ifdef CONFIG_PROC_FS
-  proc_net_fops_create(&init_net, "rxrpc_calls", 0, &rxrpc_call_seq_fops);
-  proc_net_fops_create(&init_net, "rxrpc_conns", 0, &rxrpc_connection_seq_fops);
+  proc_create("rxrpc_calls", 0, init_net.proc_net, &rxrpc_call_seq_fops);
+  proc_create("rxrpc_conns", 0, init_net.proc_net, &rxrpc_connection_seq_fops);
 #endif
   return 0;
 error_key_type_s:
   unregister_key_type(&key_type_rxrpc);
 error_key_type:
   sock_unregister(PF_RXRPC);
 error_sock:
   proto_unregister(&rxrpc_proto);
 error_proto:
   destroy_workqueue(rxrpc_workqueue);
 error_work_queue:
   kmem_cache_destroy(rxrpc_call_jar);
 error_call_jar:
   return ret;
 }<sep>@@
expression net,e1,e2,e3;
@@

- proc_net_fops_create(&net, e1, e2, e3)
+ proc_create(e1, e2, net.proc_net, e3)
--- initial
+++ final
@@ -1,14 +1,14 @@
 static int __net_init unix_net_init(struct net *net) {
   int error = -ENOMEM;
   net->unx.sysctl_max_dgram_qlen = 10;
   if (unix_sysctl_register(net)) goto out;
 #ifdef CONFIG_PROC_FS
-  if (!proc_net_fops_create(net, "unix", 0, &unix_seq_fops)) {
+  if (!proc_create("unix", 0, net->proc_net, &unix_seq_fops)) {
     unix_sysctl_unregister(net);
     goto out;
   }
 #endif
   error = 0;
 out:
   return error;
 }<sep>@@
expression net,e1,e2,e3;
@@

- proc_net_fops_create(net, e1, e2, e3)
+ proc_create(e1, e2, net->proc_net, e3)
--- initial
+++ final
@@ -1,4 +1,4 @@
 int __net_init ac6_proc_init(struct net *net) {
-  if (!proc_net_fops_create(net, "anycast6", S_IRUGO, &ac6_seq_fops)) return -ENOMEM;
+  if (!proc_create("anycast6", S_IRUGO, net->proc_net, &ac6_seq_fops)) return -ENOMEM;
   return 0;
 }<sep>@@
expression net,e1,e2,e3;
@@

- proc_net_fops_create(net, e1, e2, e3)
+ proc_create(e1, e2, net->proc_net, e3)
--- initial
+++ final
@@ -1,4 +1,4 @@
 static int __net_init arp_net_init(struct net *net) {
-  if (!proc_net_fops_create(net, "arp", S_IRUGO, &arp_seq_fops)) return -ENOMEM;
+  if (!proc_create("arp", S_IRUGO, net->proc_net, &arp_seq_fops)) return -ENOMEM;
   return 0;
 }<sep>@@
expression net,e1,e2,e3;
@@

- proc_net_fops_create(net, e1, e2, e3)
+ proc_create(e1, e2, net->proc_net, e3)
--- initial
+++ final
@@ -1,12 +1,12 @@
 static int __init bpq_init_driver(void) {
 #ifdef CONFIG_PROC_FS
-  if (!proc_net_fops_create(&init_net, "bpqether", S_IRUGO, &bpq_info_fops)) {
+  if (!proc_create("bpqether", S_IRUGO, init_net.proc_net, &bpq_info_fops)) {
     printk(KERN_ERR "bpq: cannot create /proc/net/bpqether entry.\n");
     return -ENOENT;
   }
 #endif /* CONFIG_PROC_FS */
   dev_add_pack(&bpq_packet_type);
   register_netdevice_notifier(&bpq_dev_notifier);
   printk(banner);
   return 0;
 }<sep>@@
expression net,e1,e2,e3;
@@

- proc_net_fops_create(&net, e1, e2, e3)
+ proc_create(e1, e2, net.proc_net, e3)
--- initial
+++ final
@@ -1,17 +1,17 @@
 static int cn_init(void) {
   struct cn_dev *dev = &cdev;
   struct netlink_kernel_cfg cfg = {
       .groups = CN_NETLINK_USERS + 0xf,
       .input = dev->input,
   };
   dev->nls = netlink_kernel_create(&init_net, NETLINK_CONNECTOR, &cfg);
   if (!dev->nls) return -EIO;
   dev->cbdev = cn_queue_alloc_dev("cqueue", dev->nls);
   if (!dev->cbdev) {
     netlink_kernel_release(dev->nls);
     return -EINVAL;
   }
   cn_already_initialized = 1;
-  proc_net_fops_create(&init_net, "connector", S_IRUGO, &cn_file_ops);
+  proc_create("connector", S_IRUGO, init_net.proc_net, &cn_file_ops);
   return 0;
 }<sep>@@
expression net,e1,e2,e3;
@@

- proc_net_fops_create(&net, e1, e2, e3)
+ proc_create(e1, e2, net.proc_net, e3)