]> rtime.felk.cvut.cz Git - can-eth-gw-linux.git/blobdiff - mm/memory.c
Fix bug
[can-eth-gw-linux.git] / mm / memory.c
index f9a4b0cb862363792a127483a80d213017732610..db2e9e797a05fc67684ef735ff5623b7151ad478 100644 (file)
@@ -717,13 +717,6 @@ static inline bool is_cow_mapping(vm_flags_t flags)
        return (flags & (VM_SHARED | VM_MAYWRITE)) == VM_MAYWRITE;
 }
 
-#ifndef is_zero_pfn
-static inline int is_zero_pfn(unsigned long pfn)
-{
-       return pfn == zero_pfn;
-}
-#endif
-
 /*
  * vm_normal_page -- This function gets the "struct page" associated with a pte.
  *
@@ -2787,13 +2780,8 @@ unlock:
 oom_free_new:
        page_cache_release(new_page);
 oom:
-       if (old_page) {
-               if (page_mkwrite) {
-                       unlock_page(old_page);
-                       page_cache_release(old_page);
-               }
+       if (old_page)
                page_cache_release(old_page);
-       }
        return VM_FAULT_OOM;
 
 unwritable_page: