Skip to content

Commit

Permalink
fsnotify: add flags to fsnotify_mark_entries
Browse files Browse the repository at this point in the history
To differentiate between inode and vfsmount (or other future) types of
marks we add a flags field and set the inode bit on inode marks (the only
currently supported type of mark)

Signed-off-by: Eric Paris <eparis@redhat.com>
  • Loading branch information
eparis committed Jul 28, 2010
1 parent 4136510 commit 098cf2f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/notify/inode_mark.c
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,8 @@ int fsnotify_add_mark(struct fsnotify_mark_entry *entry,
if (unlikely(!inode))
return -EINVAL;

entry->flags = FSNOTIFY_MARK_FLAG_INODE;

/*
* if this group isn't being testing for inode type events we need
* to start testing
Expand Down
3 changes: 3 additions & 0 deletions include/linux/fsnotify_backend.h
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,9 @@ struct fsnotify_mark_entry {
struct fsnotify_vfsmount_mark m;
};
struct list_head free_g_list; /* tmp list used when freeing this mark */
#define FSNOTIFY_MARK_FLAG_INODE 0x01
#define FSNOTIFY_MARK_FLAG_VFSMOUNT 0x02
unsigned int flags; /* vfsmount or inode mark? */
void (*free_mark)(struct fsnotify_mark_entry *entry); /* called on final put+free */
};

Expand Down

0 comments on commit 098cf2f

Please sign in to comment.