mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
Merge tag 'fsnotify_for_v5.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
Pull fsnotify updates from Jan Kara: "This implements the fanotify FAN_DIR_MODIFY event. This event reports the name in a directory under which a change happened and together with the directory filehandle and fstatat() allows reliable and efficient implementation of directory synchronization" * tag 'fsnotify_for_v5.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: fanotify: Fix the checks in fanotify_fsid_equal fanotify: report name info for FAN_DIR_MODIFY event fanotify: record name info for FAN_DIR_MODIFY event fanotify: Drop fanotify_event_has_fid() fanotify: prepare to report both parent and child fid's fanotify: send FAN_DIR_MODIFY event flavor with dir inode and name fanotify: divorce fanotify_path_event and fanotify_fid_event fanotify: Store fanotify handles differently fanotify: Simplify create_fd() fanotify: fix merging marks masks with FAN_ONDIR fanotify: merge duplicate events on parent and child fsnotify: replace inode pointer with an object id fsnotify: simplify arguments passing to fsnotify_parent() fsnotify: use helpers to access data by data_type fsnotify: funnel all dirent events through fsnotify_name() fsnotify: factor helpers fsnotify_dentry() and fsnotify_file() fsnotify: tidy up FS_ and FAN_ constants
This commit is contained in:
@@ -471,25 +471,13 @@ static int audit_watch_handle_event(struct fsnotify_group *group,
|
||||
struct fsnotify_iter_info *iter_info)
|
||||
{
|
||||
struct fsnotify_mark *inode_mark = fsnotify_iter_inode_mark(iter_info);
|
||||
const struct inode *inode;
|
||||
const struct inode *inode = fsnotify_data_inode(data, data_type);
|
||||
struct audit_parent *parent;
|
||||
|
||||
parent = container_of(inode_mark, struct audit_parent, mark);
|
||||
|
||||
BUG_ON(group != audit_watch_group);
|
||||
|
||||
switch (data_type) {
|
||||
case (FSNOTIFY_EVENT_PATH):
|
||||
inode = d_backing_inode(((const struct path *)data)->dentry);
|
||||
break;
|
||||
case (FSNOTIFY_EVENT_INODE):
|
||||
inode = (const struct inode *)data;
|
||||
break;
|
||||
default:
|
||||
BUG();
|
||||
inode = NULL;
|
||||
break;
|
||||
}
|
||||
WARN_ON(!inode);
|
||||
|
||||
if (mask & (FS_CREATE|FS_MOVED_TO) && inode)
|
||||
audit_update_watch(parent, dname, inode->i_sb->s_dev, inode->i_ino, 0);
|
||||
|
Reference in New Issue
Block a user