Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 207609
b: refs/heads/master
c: 40554c3
h: refs/heads/master
i:
  207607: 6320d0a
v: v3
  • Loading branch information
Eric Paris committed Jul 28, 2010
1 parent 821e4bd commit cba09d7
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9e1c74321d87a8b079f04d89e750b39a43365e1f
refs/heads/master: 40554c3dae83bd892b7fbfaa2ea9de739cbcf065
2 changes: 1 addition & 1 deletion trunk/fs/notify/dnotify/dnotify.c
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ int fcntl_dirnotify(int fd, struct file *filp, unsigned long arg)
dnentry = container_of(entry, struct dnotify_mark_entry, fsn_entry);
spin_lock(&entry->lock);
} else {
fsnotify_add_mark(new_entry, dnotify_group, inode);
fsnotify_add_mark(new_entry, dnotify_group, inode, 0);
spin_lock(&new_entry->lock);
entry = new_entry;
dnentry = new_dnentry;
Expand Down
8 changes: 5 additions & 3 deletions trunk/fs/notify/inode_mark.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,9 +312,10 @@ void fsnotify_init_mark(struct fsnotify_mark_entry *entry,
* event types should be delivered to which group and for which inodes.
*/
int fsnotify_add_mark(struct fsnotify_mark_entry *entry,
struct fsnotify_group *group, struct inode *inode)
struct fsnotify_group *group, struct inode *inode,
int allow_dups)
{
struct fsnotify_mark_entry *lentry;
struct fsnotify_mark_entry *lentry = NULL;
int ret = 0;

inode = igrab(inode);
Expand All @@ -331,7 +332,8 @@ int fsnotify_add_mark(struct fsnotify_mark_entry *entry,
spin_lock(&group->mark_lock);
spin_lock(&inode->i_lock);

lentry = fsnotify_find_mark_entry(group, inode);
if (!allow_dups)
lentry = fsnotify_find_mark_entry(group, inode);
if (!lentry) {
entry->group = group;
entry->inode = inode;
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/notify/inotify/inotify_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ static int inotify_new_watch(struct fsnotify_group *group,
goto out_err;

/* we are on the idr, now get on the inode */
ret = fsnotify_add_mark(&tmp_ientry->fsn_entry, group, inode);
ret = fsnotify_add_mark(&tmp_ientry->fsn_entry, group, inode, 0);
if (ret) {
/* we failed to get on the inode, get off the idr */
inotify_remove_from_idr(group, tmp_ientry);
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/fsnotify_backend.h
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ extern struct fsnotify_mark_entry *fsnotify_find_mark_entry(struct fsnotify_grou
/* copy the values from old into new */
extern void fsnotify_duplicate_mark(struct fsnotify_mark_entry *new, struct fsnotify_mark_entry *old);
/* attach the mark to both the group and the inode */
extern int fsnotify_add_mark(struct fsnotify_mark_entry *entry, struct fsnotify_group *group, struct inode *inode);
extern int fsnotify_add_mark(struct fsnotify_mark_entry *entry, struct fsnotify_group *group, struct inode *inode, int allow_dups);
/* given a mark, flag it to be freed when all references are dropped */
extern void fsnotify_destroy_mark_by_entry(struct fsnotify_mark_entry *entry);
/* run all the marks in a group, and flag them to be freed */
Expand Down
2 changes: 1 addition & 1 deletion trunk/kernel/audit_watch.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ static struct audit_parent *audit_init_parent(struct nameidata *ndp)

fsnotify_init_mark(&parent->mark, audit_watch_free_mark);
parent->mark.mask = AUDIT_FS_WATCH;
ret = fsnotify_add_mark(&parent->mark, audit_watch_group, inode);
ret = fsnotify_add_mark(&parent->mark, audit_watch_group, inode, 0);
if (ret < 0) {
audit_free_parent(parent);
return ERR_PTR(ret);
Expand Down

0 comments on commit cba09d7

Please sign in to comment.