fsnotify: handle filesystem unmounts with fsnotify marks

When an fs is unmounted with an fsnotify mark entry attached to one of its
inodes we need to destroy that mark entry and we also (like inotify) send
an unmount event.

Signed-off-by: Eric Paris <[email protected]>
Acked-by: Al Viro <[email protected]>
Cc: Christoph Hellwig <[email protected]>
This commit is contained in:
Eric Paris 2009-05-21 17:01:58 -04:00
commit 164bc61951
3 changed files with 77 additions and 0 deletions

View file

@ -407,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);