audit_watch.c (a05fb6cc573130915380e00d182a4c6571cec6b2) audit_watch.c (40554c3dae83bd892b7fbfaa2ea9de739cbcf065)
1/* audit_watch.c -- watching inodes
2 *
3 * Copyright 2003-2009 Red Hat, Inc.
4 * Copyright 2005 Hewlett-Packard Development Company, L.P.
5 * Copyright 2005 IBM Corporation
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by

--- 147 unchanged lines hidden (view full) ---

156 parent = kzalloc(sizeof(*parent), GFP_KERNEL);
157 if (unlikely(!parent))
158 return ERR_PTR(-ENOMEM);
159
160 INIT_LIST_HEAD(&parent->watches);
161
162 fsnotify_init_mark(&parent->mark, audit_watch_free_mark);
163 parent->mark.mask = AUDIT_FS_WATCH;
1/* audit_watch.c -- watching inodes
2 *
3 * Copyright 2003-2009 Red Hat, Inc.
4 * Copyright 2005 Hewlett-Packard Development Company, L.P.
5 * Copyright 2005 IBM Corporation
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by

--- 147 unchanged lines hidden (view full) ---

156 parent = kzalloc(sizeof(*parent), GFP_KERNEL);
157 if (unlikely(!parent))
158 return ERR_PTR(-ENOMEM);
159
160 INIT_LIST_HEAD(&parent->watches);
161
162 fsnotify_init_mark(&parent->mark, audit_watch_free_mark);
163 parent->mark.mask = AUDIT_FS_WATCH;
164 ret = fsnotify_add_mark(&parent->mark, audit_watch_group, inode);
164 ret = fsnotify_add_mark(&parent->mark, audit_watch_group, inode, 0);
165 if (ret < 0) {
166 audit_free_parent(parent);
167 return ERR_PTR(ret);
168 }
169
170 return parent;
171}
172

--- 415 unchanged lines hidden ---
165 if (ret < 0) {
166 audit_free_parent(parent);
167 return ERR_PTR(ret);
168 }
169
170 return parent;
171}
172

--- 415 unchanged lines hidden ---