X-Git-Url: http://git.monstr.eu/?a=blobdiff_plain;f=mm%2Fhuge_memory.c;h=11fe0b4dbe6730e0bdd9c5cb987c4d93feb45df7;hb=73a6e474cb376;hp=6ecd1045113b538586e87a00aec4022cf500c1f1;hpb=d54b64ef0df92101286cff739f95dd89e52ec09d;p=linux-2.6-microblaze.git diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 6ecd1045113b..11fe0b4dbe67 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -1515,13 +1515,12 @@ out_unlock: } /* - * FOLL_FORCE can write to even unwritable pmd's, but only - * after we've gone through a COW cycle and they are dirty. + * FOLL_FORCE or a forced COW break can write even to unwritable pmd's, + * but only after we've gone through a COW cycle and they are dirty. */ static inline bool can_follow_write_pmd(pmd_t pmd, unsigned int flags) { - return pmd_write(pmd) || - ((flags & FOLL_FORCE) && (flags & FOLL_COW) && pmd_dirty(pmd)); + return pmd_write(pmd) || ((flags & FOLL_COW) && pmd_dirty(pmd)); } struct page *follow_trans_huge_pmd(struct vm_area_struct *vma,