From: Eric Paris Date: Tue, 7 Jul 2009 14:28:23 +0000 (-0400) Subject: inotify: do not leak inode marks in inotify_add_watch X-Git-Tag: v2.6.31-rc5~81^2~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=75fe2b26394c59c8e16bd7b76f4be5d048103ad1;p=pandora-kernel.git inotify: do not leak inode marks in inotify_add_watch inotify_add_watch had a couple of problems. The biggest being that if inotify_add_watch was called on the same inode twice (to update or change the event mask) a refence was taken on the original inode mark by fsnotify_find_mark_entry but was not being dropped at the end of the inotify_add_watch call. Thus if inotify_rm_watch was called although the mark was removed from the inode, the refcnt wouldn't hit zero and we would leak memory. Reported-by: Catalin Marinas Signed-off-by: Eric Paris --- Reading git-diff-tree failed