diff options
author | Amy Griffis <amy.griffis@hp.com> | 2006-06-01 13:11:03 -0700 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2006-06-20 05:25:18 -0400 |
commit | a9dc971d3fdb857a2bcd6d53238125a2cd31d5f4 (patch) | |
tree | 02e8816f583b5ca40da5789ab9e8d7de9b3ed598 /fs/inotify_user.c | |
parent | 7c29772288b7026504cfe75bfd90d40fbd1574bf (diff) | |
download | kernel-crypto-a9dc971d3fdb857a2bcd6d53238125a2cd31d5f4.tar.gz kernel-crypto-a9dc971d3fdb857a2bcd6d53238125a2cd31d5f4.tar.xz kernel-crypto-a9dc971d3fdb857a2bcd6d53238125a2cd31d5f4.zip |
[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>
Diffstat (limited to 'fs/inotify_user.c')
-rw-r--r-- | fs/inotify_user.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/inotify_user.c b/fs/inotify_user.c index 8b83c719006..9e9931e2bad 100644 --- a/fs/inotify_user.c +++ b/fs/inotify_user.c @@ -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); |