Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 207608
b: refs/heads/master
c: 9e1c743
h: refs/heads/master
v: v3
  • Loading branch information
Eric Paris committed Jul 28, 2010
1 parent 6320d0a commit 821e4bd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 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: a05fb6cc573130915380e00d182a4c6571cec6b2
refs/heads/master: 9e1c74321d87a8b079f04d89e750b39a43365e1f
10 changes: 9 additions & 1 deletion trunk/fs/notify/inode_mark.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,12 +282,20 @@ struct fsnotify_mark_entry *fsnotify_find_mark_entry(struct fsnotify_group *grou
return NULL;
}

void fsnotify_duplicate_mark(struct fsnotify_mark_entry *new, struct fsnotify_mark_entry *old)
{
assert_spin_locked(&old->lock);
new->inode = old->inode;
new->group = old->group;
new->mask = old->mask;
new->free_mark = old->free_mark;
}

/*
* Nothing fancy, just initialize lists and locks and counters.
*/
void fsnotify_init_mark(struct fsnotify_mark_entry *entry,
void (*free_mark)(struct fsnotify_mark_entry *entry))

{
spin_lock_init(&entry->lock);
atomic_set(&entry->refcnt, 1);
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/linux/fsnotify_backend.h
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,8 @@ extern void fsnotify_recalc_inode_mask(struct inode *inode);
extern void fsnotify_init_mark(struct fsnotify_mark_entry *entry, void (*free_mark)(struct fsnotify_mark_entry *entry));
/* find (and take a reference) to a mark associated with group and inode */
extern struct fsnotify_mark_entry *fsnotify_find_mark_entry(struct fsnotify_group *group, struct inode *inode);
/* 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);
/* given a mark, flag it to be freed when all references are dropped */
Expand Down

0 comments on commit 821e4bd

Please sign in to comment.