Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
[cascardo/linux.git] / fs / inotify.c
index f5099d8..7457501 100644 (file)
@@ -509,7 +509,7 @@ void inotify_destroy(struct inotify_handle *ih)
                        mutex_unlock(&ih->mutex);
                        break;
                }
-               watch = list_entry(watches->next, struct inotify_watch, h_list);
+               watch = list_first_entry(watches, struct inotify_watch, h_list);
                get_inotify_watch(watch);
                mutex_unlock(&ih->mutex);