Skip to content

Commit

Permalink
[PATCH] inotify: fix idr_get_new_above usage
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Robert Love authored and Linus Torvalds committed Aug 15, 2005
1 parent 2ba8468 commit 0bf955c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/inotify.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 0bf955c

Please sign in to comment.