Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.infradead.org/users/eparis/notify
Browse files Browse the repository at this point in the history
* 'for-linus' of git://git.infradead.org/users/eparis/notify:
  fsnotify: allow groups to set freeing_mark to null
  inotify/dnotify: should_send_event shouldn't match on FS_EVENT_ON_CHILD
  dnotify: do not bother to lock entry->lock when reading mask
  dnotify: do not use ?true:false when assigning to a bool
  fsnotify: move events should indicate the event was on a child
  inotify: reimplement inotify using fsnotify
  fsnotify: handle filesystem unmounts with fsnotify marks
  fsnotify: fsnotify marks on inodes pin them in core
  fsnotify: allow groups to add private data to events
  fsnotify: add correlations between events
  fsnotify: include pathnames with entries when possible
  fsnotify: generic notification queue and waitq
  dnotify: reimplement dnotify using fsnotify
  fsnotify: parent event notification
  fsnotify: add marks to inodes so groups can interpret how to handle those inodes
  fsnotify: unified filesystem notification backend
  • Loading branch information
torvalds committed Jun 11, 2009
2 parents 512626a + a092ee2 commit 3bb66d7
Show file tree
Hide file tree
Showing 23 changed files with 2,813 additions and 662 deletions.
8 changes: 5 additions & 3 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -1802,10 +1802,10 @@ F: drivers/char/epca*
F: drivers/char/digi*

DIRECTORY NOTIFICATION (DNOTIFY)
P: Stephen Rothwell
M: [email protected].org.au
P: Eric Paris
M: eparis@parisplace.org
L: [email protected]
S: Supported
S: Maintained
F: Documentation/filesystems/dnotify.txt
F: fs/notify/dnotify/
F: include/linux/dnotify.h
Expand Down Expand Up @@ -2858,6 +2858,8 @@ P: John McCutchan
M: [email protected]
P: Robert Love
M: [email protected]
P: Eric Paris
M: [email protected]
L: [email protected]
S: Maintained
F: Documentation/filesystems/inotify.txt
Expand Down
10 changes: 10 additions & 0 deletions fs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <linux/cdev.h>
#include <linux/bootmem.h>
#include <linux/inotify.h>
#include <linux/fsnotify.h>
#include <linux/mount.h>
#include <linux/async.h>

Expand Down Expand Up @@ -189,6 +190,10 @@ struct inode *inode_init_always(struct super_block *sb, struct inode *inode)
inode->i_private = NULL;
inode->i_mapping = mapping;

#ifdef CONFIG_FSNOTIFY
inode->i_fsnotify_mask = 0;
#endif

return inode;

out_free_security:
Expand Down Expand Up @@ -221,6 +226,7 @@ void destroy_inode(struct inode *inode)
BUG_ON(inode_has_buffers(inode));
ima_inode_free(inode);
security_inode_free(inode);
fsnotify_inode_delete(inode);
if (inode->i_sb->s_op->destroy_inode)
inode->i_sb->s_op->destroy_inode(inode);
else
Expand Down Expand Up @@ -252,6 +258,9 @@ void inode_init_once(struct inode *inode)
INIT_LIST_HEAD(&inode->inotify_watches);
mutex_init(&inode->inotify_mutex);
#endif
#ifdef CONFIG_FSNOTIFY
INIT_HLIST_HEAD(&inode->i_fsnotify_mark_entries);
#endif
}
EXPORT_SYMBOL(inode_init_once);

Expand Down Expand Up @@ -398,6 +407,7 @@ int invalidate_inodes(struct super_block *sb)
mutex_lock(&iprune_mutex);
spin_lock(&inode_lock);
inotify_unmount_inodes(&sb->s_inodes);
fsnotify_unmount_inodes(&sb->s_inodes);
busy = invalidate_list(&sb->s_inodes, &throw_away);
spin_unlock(&inode_lock);

Expand Down
13 changes: 13 additions & 0 deletions fs/notify/Kconfig
Original file line number Diff line number Diff line change
@@ -1,2 +1,15 @@
config FSNOTIFY
bool "Filesystem notification backend"
default y
---help---
fsnotify is a backend for filesystem notification. fsnotify does
not provide any userspace interface but does provide the basis
needed for other notification schemes such as dnotify, inotify,
and fanotify.

Say Y here to enable fsnotify suport.

If unsure, say Y.

source "fs/notify/dnotify/Kconfig"
source "fs/notify/inotify/Kconfig"
2 changes: 2 additions & 0 deletions fs/notify/Makefile
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
obj-$(CONFIG_FSNOTIFY) += fsnotify.o notification.o group.o inode_mark.o

obj-y += dnotify/
obj-y += inotify/
1 change: 1 addition & 0 deletions fs/notify/dnotify/Kconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
config DNOTIFY
bool "Dnotify support"
depends on FSNOTIFY
default y
help
Dnotify is a directory-based per-fd file change notification system
Expand Down
Loading

0 comments on commit 3bb66d7

Please sign in to comment.