소스 검색

[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>
Robert Love 20 년 전
부모
커밋
0bf955ce98
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      fs/inotify.c

+ 1 - 1
fs/inotify.c

@@ -402,7 +402,7 @@ static struct inotify_watch *create_watch(struct inotify_device *dev,
 		return ERR_PTR(ret);
 		return ERR_PTR(ret);
 	}
 	}
 
 
-	dev->last_wd = ret;
+	dev->last_wd = watch->wd;
 	watch->mask = mask;
 	watch->mask = mask;
 	atomic_set(&watch->count, 0);
 	atomic_set(&watch->count, 0);
 	INIT_LIST_HEAD(&watch->d_list);
 	INIT_LIST_HEAD(&watch->d_list);