From: Robert Love Date: Mon, 15 Aug 2005 16:27:54 +0000 (-0400) Subject: [PATCH] inotify: fix idr_get_new_above usage X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0bf955ce98cb3cf40e20d0cc435299eb76e8819e;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [PATCH] inotify: fix idr_get_new_above usage We are saving the wrong thing in ->last_wd. We want the wd, not the return value. Signed-off-by: Robert Love Signed-off-by: Linus Torvalds --- diff --git a/fs/inotify.c b/fs/inotify.c index 27ebcac5e07f..868901b1e779 100644 --- a/fs/inotify.c +++ b/fs/inotify.c @@ -402,7 +402,7 @@ static struct inotify_watch *create_watch(struct inotify_device *dev, return ERR_PTR(ret); } - dev->last_wd = ret; + dev->last_wd = watch->wd; watch->mask = mask; atomic_set(&watch->count, 0); INIT_LIST_HEAD(&watch->d_list);