You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
[PATCH] inotify (3/5): add interfaces to kernel API
Add inotify_init_watch() so caller can use inotify_watch refcounts before calling inotify_add_watch(). Add inotify_find_watch() to find an existing watch for an (ih,inode) pair. This is similar to inotify_find_update_watch(), but does not update the watch's mask if one is found. Add inotify_rm_watch() to remove a watch via the watch pointer instead of the watch descriptor. Signed-off-by: Amy Griffis <amy.griffis@hp.com> Acked-by: Robert Love <rml@novell.com> Acked-by: John McCutchan <john@johnmccutchan.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -380,6 +380,7 @@ static int create_watch(struct inotify_device *dev, struct inode *inode,
|
||||
|
||||
atomic_inc(&dev->user->inotify_watches);
|
||||
|
||||
inotify_init_watch(&watch->wdata);
|
||||
ret = inotify_add_watch(dev->ih, &watch->wdata, inode, mask);
|
||||
if (ret < 0)
|
||||
free_inotify_user_watch(&watch->wdata);
|
||||
|
||||
Reference in New Issue
Block a user