]> err.no Git - linux-2.6/blobdiff - fs/inotify.c
[PATCH] Document idr_get_new_above() semantics, update inotify
[linux-2.6] / fs / inotify.c
index 868901b1e779301c5bae15911ae89dcc49aa2fe8..2e4e2a57708cf95dcdf348235376ef901f4dc295 100644 (file)
@@ -353,7 +353,7 @@ static int inotify_dev_get_wd(struct inotify_device *dev,
        do {
                if (unlikely(!idr_pre_get(&dev->idr, GFP_KERNEL)))
                        return -ENOSPC;
-               ret = idr_get_new_above(&dev->idr, watch, dev->last_wd, &watch->wd);
+               ret = idr_get_new_above(&dev->idr, watch, dev->last_wd+1, &watch->wd);
        } while (ret == -EAGAIN);
 
        return ret;