[lkml]   [2005]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Subjectset_page_dirty vs set_page_dirty_lock
    The comment at set_page_dirty_lock says:

    * set_page_dirty() is racy if the caller has no reference against
    * page->mapping->host, and if the page is unlocked. This is because another
    * CPU could truncate the page off the mapping and then free the mapping.
    * Usually, the page _is_ locked, or the caller is a user-space process which
    * holds a reference on the inode by having an open file.
    * In other cases, the page should be locked before running set_page_dirty().

    Still, I wander whether it might be OK to use set_page_dirty
    in another case - if I previously got a reference to the page
    with get_user_pages?
    The page wouldnt be written back in this case, would it?
    What if I'm in the middle of a system call?


    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-12-08 19:50    [W:0.019 / U:85.912 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site