Fix one-shot support in inotify. We currently drop the IN_ONESHOT flag
during watch addition. Fix is to not do that.
Signed-off-by: Robert Love <[email protected]>
Cc: John McCutchan <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
- Handle dmi_system_check() elegantly, now that my bugfix is upstream.
- Add support for the X41 and R52.
- Cleanup some comments do I do not have to keep updating them with each
new whitelisted laptop.
Signed-off-by: Robert Love <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
- Remove the relative input device
- Add an absolute input device
- Misc. cleanup and bug fixing
The patch is sizable due to the cleanup from removing the relative input
device (net -112 lines).
Signed-off-by: Robert Love <[email protected]>
Cc: Dmitry Torokhov <[email protected]>
Cc: Greg KH <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Driver for the IBM Hard Drive Active Protection System (HDAPS), an
accelerometer found in most modern ThinkPads.
Signed-off-by: Robert Love <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Background:
1) dmi_check_system() returns the count of the number of
matches. Zero thus means no matches.
2) A match callback can return nonzero to stop the match
checking.
Bug: The count is incremented after we check for the nonzero return value,
so it does not reflect the actual count. We could say this is intended,
for some dumb reason, except that it means that a match on the first check
returns zero--no matches--if the callback returns nonzero.
Attached patch implements the count before calling the callback and thus
before potentially short-circuiting.
Signed-off-by: Robert Love <[email protected]>
Cc: Andrey Panin <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
We are saving the wrong thing in ->last_wd. We want the wd, not the
return value.
Signed-off-by: Robert Love <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
The inotify help text still refers to the character device. Update it.
Fixes kernel bug #4993.
Signed-off-by: Robert Love <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
inotify system call support for PPC64
[ I don't think we need sys32 compatibility versions--and if we do, I
failed in life. ]
Signed-off-by: Robert Love <[email protected]>
Acked-by: Paul Mackerras <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Add missing fsnotify_open() hook to sys32_open().
Add fsnotify_open() hook to sys32_open() on x86-64.
Signed-off-by: Robert Love <[email protected]>
Signed-off-by: John McCutchan <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Check for (unlikely) errors in the filesystem initialization stuff in
our module_init() function.
Signed-off-by: Robert Love <[email protected]>
Signed-off-by: John McCutchan <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Change default inotify limits: Maximum instances per user to 128 and
maximum events per queue to 16k. The max instances used to be 128; the
change to 8 was a mistake. Memory consumption is fine.
Signed-off-by: Robert Love <[email protected]>
Signed-off-by: John McCutchan <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Bug fix: Ensure that the fd passed to inotify_add_watch() and
inotify_rm_watch() belongs to inotify.
Signed-off-by: Robert Love <[email protected]>
Signed-off-by: John McCutchan <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
As an optimization, use fget_light() and fput_light() where possible.
Signed-off-by: Robert Love <[email protected]>
Signed-off-by: John McCutchan <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Miscellaneous invariant clean up, comment fixes, and so on. Trivial
stuff.
Signed-off-by: Robert Love <[email protected]>
Signed-off-by: John McCutchan <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This rearranges the event ordering for "open" to be consistent with the
ordering of the other events.
Signed-off-by: Robert Love <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This moves the inotify sysctl knobs to "/proc/sys/fs/inotify" from
"/proc/sys/fs". Also some related cleanup.
Signed-off-by: Robert Love <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
inotify is intended to correct the deficiencies of dnotify, particularly
its inability to scale and its terrible user interface:
* dnotify requires the opening of one fd per each directory
that you intend to watch. This quickly results in too many
open files and pins removable media, preventing unmount.
* dnotify is directory-based. You only learn about changes to
directories. Sure, a change to a file in a directory affects
the directory, but you are then forced to keep a cache of
stat structures.
* dnotify's interface to user-space is awful. Signals?
inotify provides a more usable, simple, powerful solution to file change
notification:
* inotify's interface is a system call that returns a fd, not SIGIO.
You get a single fd, which is select()-able.
* inotify has an event that says "the filesystem that the item
you were watching is on was unmounted."
* inotify can watch directories or files.
Inotify is currently used by Beagle (a desktop search infrastructure),
Gamin (a FAM replacement), and other projects.
See Documentation/filesystems/inotify.txt.
Signed-off-by: Robert Love <[email protected]>
Cc: John McCutchan <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Convert a bunch of strdup() implementations and their callers to the new
kstrdup(). A few remain, for example see sound/core, and there are tons of
open coded strdup()'s around. Sigh. But this is a start.
Signed-off-by: Robert Love <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>