]> git.baikalelectronics.ru Git - kernel.git/commit
inotify: fix error paths in inotify_update_watch
authorEric Paris <eparis@redhat.com>
Tue, 7 Jul 2009 14:28:24 +0000 (10:28 -0400)
committerEric Paris <eparis@redhat.com>
Tue, 21 Jul 2009 19:26:26 +0000 (15:26 -0400)
commitcbb36f453190a9bf2815f3155c506997b53b5c27
treea593a3120eb8dfbf3febdf18b6d530376b593859
parent797fb0e101fc24f5ce549edb0f16804b6ab64aa8
inotify: fix error paths in inotify_update_watch

inotify_update_watch could leave things in a horrid state on a number of
error paths.  We could try to remove idr entries that didn't exist, we
could send an IN_IGNORED to userspace for watches that don't exist, and a
bit of other stupidity.  Clean these up by doing the idr addition before we
put the mark on the inode since we can clean that up on error and getting
off the inode's mark list is hard.

Signed-off-by: Eric Paris <eparis@redhat.com>
fs/notify/inotify/inotify_user.c