[PATCH] inotify.7: wds are in the range [1, INT_MAX], not [0,

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Naturally, the first inotify_add_watch() returns 1,
but also fs/notify/inotify.c:inotify_add_to_idr() allocates them with
  idr_alloc_cyclic(idr, i_mark, start=1, end=0, GFP_NOWAIT);
(start inclusive, end exclusive).

(From SYSCALL_DEFINE3(inotify_add_watch, ...),
 from inotify_update_watch(),
 from inotify_new_watch()).

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@xxxxxxxxxxxxxxxxxx>
---
 man7/inotify.7 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/man7/inotify.7 b/man7/inotify.7
index 4fe83902a..282e97ed7 100644
--- a/man7/inotify.7
+++ b/man7/inotify.7
@@ -838,7 +838,7 @@ .SH BUGS
 any pending unread events for that watch descriptor remain available to read.
 As watch descriptors are subsequently allocated with
 .BR inotify_add_watch (2),
-the kernel cycles through the range of possible watch descriptors (0 to
+the kernel cycles through the range of possible watch descriptors (1 to
 .BR INT_MAX )
 incrementally.
 When allocating a free watch descriptor, no check is made to see whether that
-- 
2.39.2

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux