Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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 <rml@novell.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Robert Love and committed by
Linus Torvalds
0bf955ce 2ba84684

+1 -1
+1 -1
fs/inotify.c
··· 402 402 return ERR_PTR(ret); 403 403 } 404 404 405 - dev->last_wd = ret; 405 + dev->last_wd = watch->wd; 406 406 watch->mask = mask; 407 407 atomic_set(&watch->count, 0); 408 408 INIT_LIST_HEAD(&watch->d_list);