imamnurby/smpl_train_seed8 huggingface dataset:
--- initial
+++ final
@@ -1,54 +1,54 @@
 static unsigned long __ref kernel_map_range(unsigned long pstart, unsigned long pend, pgprot_t prot, bool use_huge) {
   unsigned long vstart = PAGE_OFFSET + pstart;
   unsigned long vend = PAGE_OFFSET + pend;
   unsigned long alloc_bytes = 0UL;
   if ((vstart & ~PAGE_MASK) || (vend & ~PAGE_MASK)) {
     prom_printf("kernel_map: Unaligned physmem[%lx:%lx]\n", vstart, vend);
     prom_halt();
   }
   while (vstart < vend) {
     unsigned long this_end, paddr = __pa(vstart);
     pgd_t *pgd = pgd_offset_k(vstart);
     pud_t *pud;
     pmd_t *pmd;
     pte_t *pte;
     if (pgd_none(*pgd)) {
       pud_t *new;
-      new = __alloc_bootmem(PAGE_SIZE, PAGE_SIZE, PAGE_SIZE);
+      new = memblock_alloc_from(PAGE_SIZE, PAGE_SIZE, PAGE_SIZE);
       alloc_bytes += PAGE_SIZE;
       pgd_populate(&init_mm, pgd, new);
     }
     pud = pud_offset(pgd, vstart);
     if (pud_none(*pud)) {
       pmd_t *new;
       if (kernel_can_map_hugepud(vstart, vend, use_huge)) {
         vstart = kernel_map_hugepud(vstart, vend, pud);
         continue;
       }
-      new = __alloc_bootmem(PAGE_SIZE, PAGE_SIZE, PAGE_SIZE);
+      new = memblock_alloc_from(PAGE_SIZE, PAGE_SIZE, PAGE_SIZE);
       alloc_bytes += PAGE_SIZE;
       pud_populate(&init_mm, pud, new);
     }
     pmd = pmd_offset(pud, vstart);
     if (pmd_none(*pmd)) {
       pte_t *new;
       if (kernel_can_map_hugepmd(vstart, vend, use_huge)) {
         vstart = kernel_map_hugepmd(vstart, vend, pmd);
         continue;
       }
-      new = __alloc_bootmem(PAGE_SIZE, PAGE_SIZE, PAGE_SIZE);
+      new = memblock_alloc_from(PAGE_SIZE, PAGE_SIZE, PAGE_SIZE);
       alloc_bytes += PAGE_SIZE;
       pmd_populate_kernel(&init_mm, pmd, new);
     }
     pte = pte_offset_kernel(pmd, vstart);
     this_end = (vstart + PMD_SIZE) & PMD_MASK;
     if (this_end > vend) this_end = vend;
     while (vstart < this_end) {
       pte_val(*pte) = (paddr | pgprot_val(prot));
       vstart += PAGE_SIZE;
       paddr += PAGE_SIZE;
       pte++;
     }
   }
   return alloc_bytes;
 }<sep>@@
expression size, align, goal;
@@
- __alloc_bootmem(size, align, goal)
+ memblock_alloc_from(size, align, goal)
--- initial
+++ final
@@ -1 +1 @@
-static void *__ref mca_bootmem(void) { return __alloc_bootmem(sizeof(struct ia64_mca_cpu), KERNEL_STACK_SIZE, 0); }
+static void *__ref mca_bootmem(void) { return memblock_alloc_from(sizeof(struct ia64_mca_cpu), KERNEL_STACK_SIZE, 0); }<sep>@@
expression size, align, goal;
@@
- __alloc_bootmem(size, align, goal)
+ memblock_alloc_from(size, align, goal)
--- initial
+++ final
@@ -1,38 +1,38 @@
 struct pci_iommu_arena *__init iommu_arena_new_node(int nid, struct pci_controller *hose, dma_addr_t base, unsigned long window_size, unsigned long align) {
   unsigned long mem_size;
   struct pci_iommu_arena *arena;
   mem_size = window_size / (PAGE_SIZE / sizeof(unsigned long));
   /* Note that the TLB lookup logic uses bitwise concatenation,
      not addition, so the required arena alignment is based on
      the size of the window.  Retain the align parameter so that
      particular systems can over-align the arena.  */
   if (align < mem_size) align = mem_size;
 #ifdef CONFIG_DISCONTIGMEM
   arena = memblock_alloc_node(sizeof(*arena), align, nid);
   if (!NODE_DATA(nid) || !arena) {
     printk("%s: couldn't allocate arena from node %d\n"
            "    falling back to system-wide allocation\n",
            __func__, nid);
     arena = alloc_bootmem(sizeof(*arena));
   }
   arena->ptes = memblock_alloc_node(sizeof(*arena), align, nid);
   if (!NODE_DATA(nid) || !arena->ptes) {
     printk("%s: couldn't allocate arena ptes from node %d\n"
            "    falling back to system-wide allocation\n",
            __func__, nid);
-    arena->ptes = __alloc_bootmem(mem_size, align, 0);
+    arena->ptes = memblock_alloc_from(mem_size, align, 0);
   }
 #else  /* CONFIG_DISCONTIGMEM */
   arena = alloc_bootmem(sizeof(*arena));
-  arena->ptes = __alloc_bootmem(mem_size, align, 0);
+  arena->ptes = memblock_alloc_from(mem_size, align, 0);
 #endif /* CONFIG_DISCONTIGMEM */
   spin_lock_init(&arena->lock);
   arena->hose = hose;
   arena->dma_base = base;
   arena->size = window_size;
   arena->next_entry = 0;
   /* Align allocations to a multiple of a page size.  Not needed
      unless there are chip bugs.  */
   arena->align_entry = 1;
   return arena;
 }<sep>@@
expression size, align, goal;
@@
- __alloc_bootmem(size, align, goal)
+ memblock_alloc_from(size, align, goal)
--- initial
+++ final
@@ -1,7 +1,7 @@
 void *__init prom_early_alloc(unsigned long size) {
   void *ret;
-  ret = __alloc_bootmem(size, SMP_CACHE_BYTES, 0UL);
+  ret = memblock_alloc_from(size, SMP_CACHE_BYTES, 0UL);
   if (ret != NULL) memset(ret, 0, size);
   prom_early_allocated += size;
   return ret;
 }<sep>@@
expression size, align, goal;
@@
- __alloc_bootmem(size, align, goal)
+ memblock_alloc_from(size, align, goal)
--- initial
+++ final
@@ -1,15 +1,15 @@
 void *__init move_initrd(unsigned long mem_limit) {
   void *start;
   unsigned long size;
   size = initrd_end - initrd_start;
-  start = __alloc_bootmem(PAGE_ALIGN(size), PAGE_SIZE, 0);
+  start = memblock_alloc_from(PAGE_ALIGN(size), PAGE_SIZE, 0);
   if (!start || __pa(start) + size > mem_limit) {
     initrd_start = initrd_end = 0;
     return NULL;
   }
   memmove(start, (void *)initrd_start, size);
   initrd_start = (unsigned long)start;
   initrd_end = initrd_start + size;
   printk("initrd moved to %p\n", start);
   return start;
 }<sep>@@
expression size, align, goal;
@@
- __alloc_bootmem(size, align, goal)
+ memblock_alloc_from(size, align, goal)
--- initial
+++ final
@@ -1,20 +1,20 @@
 static void *__init pcpu_alloc_bootmem(unsigned int cpu, size_t size, size_t align) {
   const unsigned long goal = __pa(MAX_DMA_ADDRESS);
 #ifdef CONFIG_NEED_MULTIPLE_NODES
   int node = cpu_to_node(cpu);
   void *ptr;
   if (!node_online(node) || !NODE_DATA(node)) {
-    ptr = __alloc_bootmem(size, align, goal);
+    ptr = memblock_alloc_from(size, align, goal);
     pr_info("cpu %d has no node %d or node-local memory\n", cpu, node);
     pr_debug("per cpu data for cpu%d %lu bytes at %016lx\n", cpu, size, __pa(ptr));
   } else {
     ptr = memblock_alloc_try_nid(size, align, goal, BOOTMEM_ALLOC_ACCESSIBLE, node);
     pr_debug("per cpu data for cpu%d %lu bytes on node%d at "
              "%016lx\n",
              cpu, size, node, __pa(ptr));
   }
   return ptr;
 #else
-  return __alloc_bootmem(size, align, goal);
+  return memblock_alloc_from(size, align, goal);
 #endif
 }<sep>@@
expression size, align, goal;
@@
- __alloc_bootmem(size, align, goal)
+ memblock_alloc_from(size, align, goal)
--- initial
+++ final
@@ -1,22 +1,22 @@
 static void __init pcpu_populate_pte(unsigned long addr) {
   pgd_t *pgd = pgd_offset_k(addr);
   pud_t *pud;
   pmd_t *pmd;
   if (pgd_none(*pgd)) {
     pud_t *new;
-    new = __alloc_bootmem(PAGE_SIZE, PAGE_SIZE, PAGE_SIZE);
+    new = memblock_alloc_from(PAGE_SIZE, PAGE_SIZE, PAGE_SIZE);
     pgd_populate(&init_mm, pgd, new);
   }
   pud = pud_offset(pgd, addr);
   if (pud_none(*pud)) {
     pmd_t *new;
-    new = __alloc_bootmem(PAGE_SIZE, PAGE_SIZE, PAGE_SIZE);
+    new = memblock_alloc_from(PAGE_SIZE, PAGE_SIZE, PAGE_SIZE);
     pud_populate(&init_mm, pud, new);
   }
   pmd = pmd_offset(pud, addr);
   if (!pmd_present(*pmd)) {
     pte_t *new;
-    new = __alloc_bootmem(PAGE_SIZE, PAGE_SIZE, PAGE_SIZE);
+    new = memblock_alloc_from(PAGE_SIZE, PAGE_SIZE, PAGE_SIZE);
     pmd_populate_kernel(&init_mm, pmd, new);
   }
 }<sep>@@
expression size, align, goal;
@@
- __alloc_bootmem(size, align, goal)
+ memblock_alloc_from(size, align, goal)
--- initial
+++ final
@@ -1,16 +1,16 @@
 static void __init sparc_context_init(int numctx) {
   int ctx;
   unsigned long size;
   size = numctx * sizeof(struct ctx_list);
-  ctx_list_pool = __alloc_bootmem(size, SMP_CACHE_BYTES, 0UL);
+  ctx_list_pool = memblock_alloc_from(size, SMP_CACHE_BYTES, 0UL);
   for (ctx = 0; ctx < numctx; ctx++) {
     struct ctx_list *clist;
     clist = (ctx_list_pool + ctx);
     clist->ctx_number = ctx;
     clist->ctx_mm = NULL;
   }
   ctx_free.next = ctx_free.prev = &ctx_free;
   ctx_used.next = ctx_used.prev = &ctx_used;
   for (ctx = 0; ctx < numctx; ctx++)
     add_to_free_ctxlist(ctx_list_pool + ctx);
 }<sep>@@
expression size, align, goal;
@@
- __alloc_bootmem(size, align, goal)
+ memblock_alloc_from(size, align, goal)
--- initial
+++ final
@@ -1,32 +1,32 @@
 static void __init srmmu_nocache_init(void) {
   void *srmmu_nocache_bitmap;
   unsigned int bitmap_bits;
   pgd_t *pgd;
   pmd_t *pmd;
   pte_t *pte;
   unsigned long paddr, vaddr;
   unsigned long pteval;
   bitmap_bits = srmmu_nocache_size >> SRMMU_NOCACHE_BITMAP_SHIFT;
-  srmmu_nocache_pool = __alloc_bootmem(srmmu_nocache_size, SRMMU_NOCACHE_ALIGN_MAX, 0UL);
+  srmmu_nocache_pool = memblock_alloc_from(srmmu_nocache_size, SRMMU_NOCACHE_ALIGN_MAX, 0UL);
   memset(srmmu_nocache_pool, 0, srmmu_nocache_size);
-  srmmu_nocache_bitmap = __alloc_bootmem(BITS_TO_LONGS(bitmap_bits) * sizeof(long), SMP_CACHE_BYTES, 0UL);
+  srmmu_nocache_bitmap = memblock_alloc_from(BITS_TO_LONGS(bitmap_bits) * sizeof(long), SMP_CACHE_BYTES, 0UL);
   bit_map_init(&srmmu_nocache_map, srmmu_nocache_bitmap, bitmap_bits);
   srmmu_swapper_pg_dir = __srmmu_get_nocache(SRMMU_PGD_TABLE_SIZE, SRMMU_PGD_TABLE_SIZE);
   memset(__nocache_fix(srmmu_swapper_pg_dir), 0, SRMMU_PGD_TABLE_SIZE);
   init_mm.pgd = srmmu_swapper_pg_dir;
   srmmu_early_allocate_ptable_skeleton(SRMMU_NOCACHE_VADDR, srmmu_nocache_end);
   paddr = __pa((unsigned long)srmmu_nocache_pool);
   vaddr = SRMMU_NOCACHE_VADDR;
   while (vaddr < srmmu_nocache_end) {
     pgd = pgd_offset_k(vaddr);
     pmd = pmd_offset(__nocache_fix(pgd), vaddr);
     pte = pte_offset_kernel(__nocache_fix(pmd), vaddr);
     pteval = ((paddr >> 4) | SRMMU_ET_PTE | SRMMU_PRIV);
     if (srmmu_cache_pagetables) pteval |= SRMMU_CACHE;
     set_pte(__nocache_fix(pte), __pte(pteval));
     vaddr += PAGE_SIZE;
     paddr += PAGE_SIZE;
   }
   flush_cache_all();
   flush_tlb_all();
 }<sep>@@
expression size, align, goal;
@@
- __alloc_bootmem(size, align, goal)
+ memblock_alloc_from(size, align, goal)
--- initial
+++ final
@@ -1,6 +1,6 @@
 static void spufs_evict_inode(struct inode *inode) {
   struct spufs_inode_info *ei = SPUFS_I(inode);
-  end_writeback(inode);
+  clear_inode(inode);
   if (ei->i_ctx) put_spu_context(ei->i_ctx);
   if (ei->i_gang) put_spu_gang(ei->i_gang);
 }<sep>@@
expression E0;
@@
- end_writeback(E0); 
+ clear_inode(E0);
--- initial
+++ final
@@ -1,21 +1,21 @@
 static struct dentry *logfs_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) {
   struct page *page;
   struct logfs_disk_dentry *dd;
   pgoff_t index;
   u64 ino = 0;
   struct inode *inode;
   page = logfs_get_dd_page(dir, dentry);
   if (IS_ERR(page)) return ERR_CAST(page);
   if (!page) {
     d_add(dentry, NULL);
     return NULL;
   }
   index = page->index;
   dd = kmap_atomic(page);
   ino = be64_to_cpu(dd->ino);
   kunmap_atomic(dd);
-  page_cache_release(page);
+  put_page(page);
   inode = logfs_iget(dir->i_sb, ino);
   if (IS_ERR(inode)) printk(KERN_ERR "LogFS: Cannot read inode #%llx for dentry (%lx, %lx)n", ino, dir->i_ino, index);
   return d_splice_alias(inode, dentry);
 }<sep>@@
expression E;
@@
- page_cache_release(E)
+ put_page(E)
--- initial
+++ final
@@ -1,11 +1,11 @@
 static int cnic_abort_prep(struct cnic_sock *csk) {
   clear_bit(SK_F_CONNECT_START, &csk->flags);
-  smp_mb__after_clear_bit();
+  smp_mb__after_atomic();
   while (test_and_set_bit(SK_F_OFFLD_SCHED, &csk->flags))
     msleep(1);
   if (test_and_clear_bit(SK_F_OFFLD_COMPLETE, &csk->flags)) {
     csk->state = L4_KCQE_OPCODE_VALUE_RESET_COMP;
     return 1;
   }
   return 0;
 }<sep>@@
@@
-       smp_mb__after_clear_bit();
+       smp_mb__after_atomic();
--- initial
+++ final
@@ -1,5 +1,5 @@
 static inline long do_compat_cache_op(unsigned long start, unsigned long end, int flags) {
   if (end < start || flags) return -EINVAL;
-  if (!access_ok(VERIFY_READ, (const void __user *)start, end - start)) return -EFAULT;
+  if (!access_ok((const void __user *)start, end - start)) return -EFAULT;
   return __do_compat_cache_op(start, end);
 }<sep>@@
expression e1,e2,e3;
@@
  access_ok(
-        e1,
      e2,e3)
--- initial
+++ final
@@ -1,42 +1,41 @@
 static int nilfs_get_root_dentry(struct super_block *sb, struct nilfs_root *root, struct dentry **root_dentry) {
   struct inode *inode;
   struct dentry *dentry;
   int ret = 0;
   inode = nilfs_iget(sb, root, NILFS_ROOT_INO);
   if (IS_ERR(inode)) {
     printk(KERN_ERR "NILFS: get root inode failed\n");
     ret = PTR_ERR(inode);
     goto out;
   }
   if (!S_ISDIR(inode->i_mode) || !inode->i_blocks || !inode->i_size) {
     iput(inode);
     printk(KERN_ERR "NILFS: corrupt root inode.\n");
     ret = -EINVAL;
     goto out;
   }
   if (root->cno == NILFS_CPTREE_CURRENT_CNO) {
     dentry = d_find_alias(inode);
     if (!dentry) {
-      dentry = d_alloc_root(inode);
+      dentry = d_make_root(inode);
       if (!dentry) {
-        iput(inode);
         ret = -ENOMEM;
         goto failed_dentry;
       }
     } else {
       iput(inode);
     }
   } else {
     dentry = d_obtain_alias(inode);
     if (IS_ERR(dentry)) {
       ret = PTR_ERR(dentry);
       goto failed_dentry;
     }
   }
   *root_dentry = dentry;
 out:
   return ret;
 failed_dentry:
   printk(KERN_ERR "NILFS: get root dentry failed\n");
   goto out;
 }<sep>@@
expression e1,root;
@@

-       e1 = d_alloc_root(root)
+       e1 = d_make_root(root)
        ...
        if ((e1) == NULL) {
		...
-               iput(root);
		...
        }
--- initial
+++ final
@@ -1,46 +1,46 @@
 static int setup_rt_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs) {
   struct rt_sigframe __user *frame;
   unsigned long __user *retcode;
   int err = 0;
   frame = get_sigframe(ksig, regs, sizeof(*frame));
-  if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame))) return -EFAULT;
+  if (!access_ok(frame, sizeof(*frame))) return -EFAULT;
   err |= __put_user(&frame->info, &frame->pinfo);
   err |= __put_user(&frame->uc, &frame->puc);
   err |= copy_siginfo_to_user(&frame->info, &ksig->info);
   /* Clear all the bits of the ucontext we don't use.  */
   err |= __clear_user(&frame->uc, offsetof(struct ucontext, uc_mcontext));
   err |= setup_sigcontext(&frame->uc.uc_mcontext, regs, set->sig[0]);
   err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set));
   /* Set up to return from userspace */
   retcode = (unsigned long __user *)&frame->retcode;
   /* The access_ok check was done above, so use __put_user here */
 #define COPY(x) (err |= __put_user(x, retcode++))
   COPY(0x0000002AUL | (__NR_rt_sigreturn << 7));
   /* MVK __NR_rt_sigreturn,B0 */
   COPY(0x10000000UL); /* SWE */
   COPY(0x00006000UL); /* NOP 4 */
   COPY(0x00006000UL); /* NOP 4 */
   COPY(0x00006000UL); /* NOP 4 */
   COPY(0x00006000UL); /* NOP 4 */
   COPY(0x00006000UL); /* NOP 4 */
   COPY(0x00006000UL); /* NOP 4 */
   COPY(0x00006000UL); /* NOP 4 */
 #undef COPY
   if (err) return -EFAULT;
   flush_icache_range((unsigned long)&frame->retcode, (unsigned long)&frame->retcode + RETCODE_SIZE);
   retcode = (unsigned long __user *)&frame->retcode;
   /* Change user context to branch to signal handler */
   regs->sp = (unsigned long)frame - 8;
   regs->b3 = (unsigned long)retcode;
   regs->pc = (unsigned long)ksig->ka.sa.sa_handler;
   /* Give the signal number to the handler */
   regs->a4 = ksig->sig;
   /*
    * For realtime signals we must also set the second and third
    * arguments for the signal handler.
    *   -- Peter Maydell <pmaydell@chiark.greenend.org.uk> 2000-12-06
    */
   regs->b4 = (unsigned long)&frame->info;
   regs->a6 = (unsigned long)&frame->uc;
   return 0;
 }<sep>@@
expression e1,e2,e3;
@@
  access_ok(
-        e1,
      e2,e3)
--- initial
+++ final
@@ -1,12 +1,12 @@
 bool bio_attempt_back_merge(struct request_queue *q, struct request *req, struct bio *bio) {
   const int ff = bio->bi_rw & REQ_FAILFAST_MASK;
   if (!ll_back_merge_fn(q, req, bio)) return false;
   trace_block_bio_backmerge(q, req, bio);
   if ((req->cmd_flags & REQ_FAILFAST_MASK) != ff) blk_rq_set_mixed_merge(req);
   req->biotail->bi_next = bio;
   req->biotail = bio;
-  req->__data_len += bio->bi_size;
+  req->__data_len += bio->bi_iter.bi_size;
   req->ioprio = ioprio_best(req->ioprio, bio_prio(bio));
   blk_account_io_start(req, false);
   return true;
 }<sep>@@
struct bio *bio;
@@
- bio->bi_size
+ bio->bi_iter.bi_size
--- initial
+++ final
@@ -1,4 +1,4 @@
 static void genpd_sd_counter_inc(struct generic_pm_domain *genpd) {
   atomic_inc(&genpd->sd_count);
-  smp_mb__after_atomic_inc();
+  smp_mb__after_atomic();
 }<sep>@@
@@
-       smp_mb__after_atomic_inc();
+       smp_mb__after_atomic();
--- initial
+++ final
@@ -1,68 +1,68 @@
 static int ioctl_queue_iso(struct client *client, union ioctl_arg *arg) {
   struct fw_cdev_queue_iso *a = &arg->queue_iso;
   struct fw_cdev_iso_packet __user *p, *end, *next;
   struct fw_iso_context *ctx = client->iso_context;
   unsigned long payload, buffer_end, transmit_header_bytes = 0;
   u32 control;
   int count;
   struct {
     struct fw_iso_packet packet;
     u8 header[256];
   } u;
   if (ctx == NULL || a->handle != 0) return -EINVAL;
   /*
    * If the user passes a non-NULL data pointer, has mmap()'ed
    * the iso buffer, and the pointer points inside the buffer,
    * we setup the payload pointers accordingly.  Otherwise we
    * set them both to 0, which will still let packets with
    * payload_length == 0 through.  In other words, if no packets
    * use the indirect payload, the iso buffer need not be mapped
    * and the a->data pointer is ignored.
    */
   payload = (unsigned long)a->data - client->vm_start;
   buffer_end = client->buffer.page_count << PAGE_SHIFT;
   if (a->data == 0 || client->buffer.pages == NULL || payload >= buffer_end) {
     payload = 0;
     buffer_end = 0;
   }
   if (ctx->type == FW_ISO_CONTEXT_RECEIVE_MULTICHANNEL && payload & 3) return -EINVAL;
   p = (struct fw_cdev_iso_packet __user *)u64_to_uptr(a->packets);
-  if (!access_ok(VERIFY_READ, p, a->size)) return -EFAULT;
+  if (!access_ok(p, a->size)) return -EFAULT;
   end = (void __user *)p + a->size;
   count = 0;
   while (p < end) {
     if (get_user(control, &p->control)) return -EFAULT;
     u.packet.payload_length = GET_PAYLOAD_LENGTH(control);
     u.packet.interrupt = GET_INTERRUPT(control);
     u.packet.skip = GET_SKIP(control);
     u.packet.tag = GET_TAG(control);
     u.packet.sy = GET_SY(control);
     u.packet.header_length = GET_HEADER_LENGTH(control);
     switch (ctx->type) {
     case FW_ISO_CONTEXT_TRANSMIT:
       if (u.packet.header_length & 3) return -EINVAL;
       transmit_header_bytes = u.packet.header_length;
       break;
     case FW_ISO_CONTEXT_RECEIVE:
       if (u.packet.header_length == 0 || u.packet.header_length % ctx->header_size != 0) return -EINVAL;
       break;
     case FW_ISO_CONTEXT_RECEIVE_MULTICHANNEL:
       if (u.packet.payload_length == 0 || u.packet.payload_length & 3) return -EINVAL;
       break;
     }
     next = (struct fw_cdev_iso_packet __user *)&p->header[transmit_header_bytes / 4];
     if (next > end) return -EINVAL;
     if (__copy_from_user(u.packet.header, p->header, transmit_header_bytes)) return -EFAULT;
     if (u.packet.skip && ctx->type == FW_ISO_CONTEXT_TRANSMIT && u.packet.header_length + u.packet.payload_length > 0) return -EINVAL;
     if (payload + u.packet.payload_length > buffer_end) return -EINVAL;
     if (fw_iso_context_queue(ctx, &u.packet, &client->buffer, payload)) break;
     p = next;
     payload += u.packet.payload_length;
     count++;
   }
   fw_iso_context_queue_flush(ctx);
   a->size -= uptr_to_u64(p) - a->packets;
   a->packets = uptr_to_u64(p);
   a->data = client->vm_start + payload;
   return count;
 }<sep>@@
expression e1,e2,e3;
@@
  access_ok(
-        e1,
      e2,e3)
--- initial
+++ final
@@ -1,6 +1,6 @@
 static void free_pending_exception(struct dm_snap_pending_exception *pe) {
   struct dm_snapshot *s = pe->snap;
   mempool_free(pe, s->pending_pool);
-  smp_mb__before_atomic_dec();
+  smp_mb__before_atomic();
   atomic_dec(&s->pending_exceptions_count);
 }<sep>@@
@@
-       smp_mb__before_atomic_dec();
+       smp_mb__before_atomic();
--- initial
+++ final
@@ -1,72 +1,72 @@
 static void gfs2_evict_inode(struct inode *inode) {
   struct super_block *sb = inode->i_sb;
   struct gfs2_sbd *sdp = sb->s_fs_info;
   struct gfs2_inode *ip = GFS2_I(inode);
   struct gfs2_holder gh;
   int error;
   if (inode->i_nlink || (sb->s_flags & MS_RDONLY)) goto out;
   /* Must not read inode block until block type has been verified */
   error = gfs2_glock_nq_init(ip->i_gl, LM_ST_EXCLUSIVE, GL_SKIP, &gh);
   if (unlikely(error)) {
     gfs2_glock_dq_uninit(&ip->i_iopen_gh);
     goto out;
   }
   if (!test_bit(GIF_ALLOC_FAILED, &ip->i_flags)) {
     error = gfs2_check_blk_type(sdp, ip->i_no_addr, GFS2_BLKST_UNLINKED);
     if (error) goto out_truncate;
   }
   if (test_bit(GIF_INVALID, &ip->i_flags)) {
     error = gfs2_inode_refresh(ip);
     if (error) goto out_truncate;
   }
   ip->i_iopen_gh.gh_flags |= GL_NOCACHE;
   gfs2_glock_dq_wait(&ip->i_iopen_gh);
   gfs2_holder_reinit(LM_ST_EXCLUSIVE, LM_FLAG_TRY_1CB | GL_NOCACHE, &ip->i_iopen_gh);
   error = gfs2_glock_nq(&ip->i_iopen_gh);
   if (error) goto out_truncate;
   /* Case 1 starts here */
   if (S_ISDIR(inode->i_mode) && (ip->i_diskflags & GFS2_DIF_EXHASH)) {
     error = gfs2_dir_exhash_dealloc(ip);
     if (error) goto out_unlock;
   }
   if (ip->i_eattr) {
     error = gfs2_ea_dealloc(ip);
     if (error) goto out_unlock;
   }
   if (!gfs2_is_stuffed(ip)) {
     error = gfs2_file_dealloc(ip);
     if (error) goto out_unlock;
   }
   error = gfs2_dinode_dealloc(ip);
   goto out_unlock;
 out_truncate:
   gfs2_log_flush(sdp, ip->i_gl);
   write_inode_now(inode, 1);
   gfs2_ail_flush(ip->i_gl, 0);
   /* Case 2 starts here */
   error = gfs2_trans_begin(sdp, 0, sdp->sd_jdesc->jd_blocks);
   if (error) goto out_unlock;
   /* Needs to be done before glock release & also in a transaction */
   truncate_inode_pages(&inode->i_data, 0);
   gfs2_trans_end(sdp);
 out_unlock:
   /* Error path for case 1 */
   if (test_bit(HIF_HOLDER, &ip->i_iopen_gh.gh_iflags)) gfs2_glock_dq(&ip->i_iopen_gh);
   gfs2_holder_uninit(&ip->i_iopen_gh);
   gfs2_glock_dq_uninit(&gh);
   if (error && error != GLR_TRYFAILED && error != -EROFS) fs_warn(sdp, "gfs2_evict_inode: %d\n", error);
 out:
   /* Case 3 starts here */
   truncate_inode_pages(&inode->i_data, 0);
-  end_writeback(inode);
+  clear_inode(inode);
   gfs2_dir_hash_inval(ip);
   ip->i_gl->gl_object = NULL;
   flush_delayed_work_sync(&ip->i_gl->gl_work);
   gfs2_glock_add_to_lru(ip->i_gl);
   gfs2_glock_put(ip->i_gl);
   ip->i_gl = NULL;
   if (ip->i_iopen_gh.gh_gl) {
     ip->i_iopen_gh.gh_gl->gl_object = NULL;
     gfs2_glock_dq_uninit(&ip->i_iopen_gh);
   }
 }<sep>@@
expression E0;
@@
- end_writeback(E0); 
+ clear_inode(E0);