fsnotify: take inode->i_lock inside fsnotify_find_mark_entry()

All callers to fsnotify_find_mark_entry() except one take and
release inode->i_lock around the call.  Take the lock inside
fsnotify_find_mark_entry() instead.

Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Signed-off-by: Eric Paris <eparis@redhat.com>
This commit is contained in:
Andreas Gruenbacher
2009-12-17 21:24:25 -05:00
committed by Eric Paris
부모 ef5e2b785f
커밋 3556608709
6개의 변경된 파일19개의 추가작업 그리고 32개의 파일을 삭제

파일 보기

@@ -97,9 +97,7 @@ static int inotify_handle_event(struct fsnotify_group *group, struct fsnotify_ev
to_tell = event->to_tell;
spin_lock(&to_tell->i_lock);
fsn_mark = fsnotify_find_mark(group, to_tell);
spin_unlock(&to_tell->i_lock);
/* race with watch removal? We already passes should_send */
if (unlikely(!fsn_mark))
return 0;
@@ -147,9 +145,7 @@ static bool inotify_should_send_event(struct fsnotify_group *group, struct inode
struct fsnotify_mark *fsn_mark;
bool send;
spin_lock(&inode->i_lock);
fsn_mark = fsnotify_find_mark(group, inode);
spin_unlock(&inode->i_lock);
if (!fsn_mark)
return false;