diff options
author | Eric Paris <eparis@redhat.com> | 2009-12-18 02:12:05 +0100 |
---|---|---|
committer | Eric Paris <eparis@redhat.com> | 2010-07-28 15:58:17 +0200 |
commit | 9e1c74321d87a8b079f04d89e750b39a43365e1f (patch) | |
tree | 2513ce9eaa620b50c32be3dbe2763bcb692f99cb /fs/notify/inode_mark.c | |
parent | audit: do not get and put just to free a watch (diff) | |
download | linux-9e1c74321d87a8b079f04d89e750b39a43365e1f.tar.xz linux-9e1c74321d87a8b079f04d89e750b39a43365e1f.zip |
fsnotify: duplicate fsnotify_mark_entry data between 2 marks
Simple copy fsnotify information from one mark to another in preparation
for the second mark to replace the first.
Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'fs/notify/inode_mark.c')
-rw-r--r-- | fs/notify/inode_mark.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/notify/inode_mark.c b/fs/notify/inode_mark.c index 0399bcbe09c8..a13cf9e9233a 100644 --- a/fs/notify/inode_mark.c +++ b/fs/notify/inode_mark.c @@ -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); |