From: Robert Love Date: Mon, 15 Aug 2005 16:27:54 +0000 (-0400) Subject: [PATCH] inotify: fix idr_get_new_above usage X-Git-Tag: v2.6.13-rc7~89 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=0bf955ce98cb3cf40e20d0cc435299eb76e8819e;p=linux-2.6-omap-h63xx.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 27ebcac5e07..868901b1e77 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);