integrity: move ima_counts_get
[linux-3.10.git] / mm / shmem.c
index a817f75..0132fbd 100644 (file)
@@ -2659,6 +2659,7 @@ struct file *shmem_file_setup(char *name, loff_t size, unsigned long flags)
        if (error)
                goto close_file;
 #endif
+       ima_counts_get(file);
        return file;
 
 close_file:
@@ -2684,7 +2685,6 @@ int shmem_zero_setup(struct vm_area_struct *vma)
        if (IS_ERR(file))
                return PTR_ERR(file);
 
-       ima_counts_get(file);
        if (vma->vm_file)
                fput(vma->vm_file);
        vma->vm_file = file;