]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - fs/inotify.c
Introduce a handy list_first_entry macro
[net-next-2.6.git] / fs / inotify.c
index f5099d86fd91fba6d3574e804be85a26e2201d68..7457501b95656087cfe27339b94d3bace7585782 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);