Skip to content

Commit 0bf955c

Browse files
Robert LoveLinus Torvalds
authored andcommitted
[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>
1 parent 2ba8468 commit 0bf955c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎fs/inotify.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ static struct inotify_watch *create_watch(struct inotify_device *dev,
402402
return ERR_PTR(ret);
403403
}
404404

405-
dev->last_wd = ret;
405+
dev->last_wd = watch->wd;
406406
watch->mask = mask;
407407
atomic_set(&watch->count, 0);
408408
INIT_LIST_HEAD(&watch->d_list);

0 commit comments

Comments
 (0)