lkml.org 
[lkml]   [2008]   [Dec]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH -v4 07/14] fsnotify: add in inode fsnotify markings
On Sat, Dec 13, 2008 at 11:35:09AM -0500, Eric Paris wrote:

> So to find an entry we need to first grab the inode->i_lock and start to
> walk the inode->i_fsnotify_mark_entries list. Since we hold the i_lock
> we are not allowed to grab any other locks nor are we allowed to change
> anything other than entry->i_list. The secret sauce is that we actually
> move the entry from the inode list to a private list which we can walk
> and modify lockless. Inside the event we actually have to use a
> different list, free_i_list, for this operation so nothing else that
> races with us can mess stuff up. We run the entire inode we are trying
> to free all entries for an put the entries on the private list. We do
> NOT modify event->inode.

And just what happens if #3 ("remove entry") hits us in the meanwhile? Freed
object sitting on free_i_list?


\
 
 \ /
  Last update: 2008-12-22 14:45    [W:0.132 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site